Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
b6bb8163
Commit
b6bb8163
authored
Mar 02, 2021
by
Vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: expose tree information in the event close #315
parent
72b42d7b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
index.vue
src/components/Tree/src/index.vue
+12
-4
No files found.
src/components/Tree/src/index.vue
View file @
b6bb8163
<
script
lang=
"tsx"
>
<
script
lang=
"tsx"
>
import
type
{
ReplaceFields
,
Keys
,
CheckKeys
,
TreeActionType
,
TreeItem
}
from
'
./types
'
;
import
type
{
ReplaceFields
,
Keys
,
CheckKeys
,
TreeActionType
,
TreeItem
}
from
'
./types
'
;
import
{
defineComponent
,
reactive
,
computed
,
unref
,
ref
,
watchEffect
,
onMounted
}
from
'
vue
'
;
import
{
defineComponent
,
reactive
,
computed
,
unref
,
ref
,
watchEffect
,
onMounted
,
toRaw
,
}
from
'
vue
'
;
import
{
Tree
}
from
'
ant-design-vue
'
;
import
{
Tree
}
from
'
ant-design-vue
'
;
import
{
TreeIcon
}
from
'
./TreeIcon
'
;
import
{
TreeIcon
}
from
'
./TreeIcon
'
;
// import { DownOutlined } from '@ant-design/icons-vue';
// import { DownOutlined } from '@ant-design/icons-vue';
...
@@ -77,9 +86,8 @@
...
@@ -77,9 +86,8 @@
state
.
selectedKeys
=
v
;
state
.
selectedKeys
=
v
;
emit
(
'
update:selectedKeys
'
,
v
);
emit
(
'
update:selectedKeys
'
,
v
);
},
},
onCheck
:
(
v
:
CheckKeys
,
e
)
=>
{
onCheck
:
(
v
:
CheckKeys
)
=>
{
state
.
checkedKeys
=
v
;
state
.
checkedKeys
=
v
;
console
.
log
(
e
);
emit
(
'
update:value
'
,
v
);
emit
(
'
update:value
'
,
v
);
},
},
onRightClick
:
handleRightClick
,
onRightClick
:
handleRightClick
,
...
@@ -128,7 +136,7 @@
...
@@ -128,7 +136,7 @@
const
propsData
=
omit
(
item
,
'
title
'
);
const
propsData
=
omit
(
item
,
'
title
'
);
const
icon
=
getIcon
({
...
item
,
level
},
item
.
icon
);
const
icon
=
getIcon
({
...
item
,
level
},
item
.
icon
);
return
(
return
(
<
Tree
.
TreeNode
{...
propsData
}
key
=
{
get
(
item
,
keyField
)}
>
<
Tree
.
TreeNode
{...
propsData
}
node
=
{
toRaw
(
item
)}
key
=
{
get
(
item
,
keyField
)}
>
{{
{{
title
:
()
=>
(
title
:
()
=>
(
<
span
class
=
{
`
${
prefixCls
}
-title`
}
>
<
span
class
=
{
`
${
prefixCls
}
-title`
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment