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
3ed2339a
Commit
3ed2339a
authored
May 29, 2021
by
无木
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(tree): support defaultExpandAll prop
defaultExpandLevel已去除-1的行为定义,由defaultExpandAll代替。
parent
6edca1c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
Tree.vue
src/components/Tree/src/Tree.vue
+3
-4
props.ts
src/components/Tree/src/props.ts
+1
-0
index.vue
src/views/demo/tree/index.vue
+1
-1
No files found.
src/components/Tree/src/Tree.vue
View file @
3ed2339a
...
...
@@ -211,12 +211,11 @@
});
onMounted
(()
=>
{
if
(
props
.
defaultExpandLevel
===
''
)
return
;
const
level
=
parseInt
(
props
.
defaultExpandLevel
);
if
(
level
===
-
1
)
{
expandAll
(
true
);
}
else
if
(
level
>
0
)
{
if
(
level
>
0
)
{
state
.
expandedKeys
=
filterByLevel
(
level
);
}
else
if
(
props
.
defaultExpandAll
)
{
expandAll
(
true
);
}
});
...
...
src/components/Tree/src/props.ts
View file @
3ed2339a
...
...
@@ -27,6 +27,7 @@ export const basicProps = {
type
:
[
String
,
Number
]
as
PropType
<
string
|
number
>
,
default
:
''
,
},
defaultExpandAll
:
propTypes
.
bool
.
def
(
false
),
replaceFields
:
{
type
:
Object
as
PropType
<
ReplaceFields
>
,
...
...
src/views/demo/tree/index.vue
View file @
3ed2339a
...
...
@@ -13,7 +13,7 @@
title=
"可勾选,默认全部展开"
:checkable=
"true"
class=
"w-1/3 mx-4"
defaultExpand
Level=
"-1"
defaultExpand
All
@
check=
"handleCheck"
/>
...
...
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