Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
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
ui
merchant-manage-ui
Commits
d0e15cba
Commit
d0e15cba
authored
Nov 07, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改半选状态
parent
3858aa57
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
index.jsx
src/components/CustomTree/index.jsx
+6
-1
No files found.
src/components/CustomTree/index.jsx
View file @
d0e15cba
...
@@ -163,6 +163,7 @@ const CustomTree = forwardRef(props => {
...
@@ -163,6 +163,7 @@ const CustomTree = forwardRef(props => {
list
.
forEach
(
node
=>
{
list
.
forEach
(
node
=>
{
if
(
node
.
key
===
ckey
)
{
if
(
node
.
key
===
ckey
)
{
node
.
checked
=
isChecked
;
node
.
checked
=
isChecked
;
// node.indeterminate = !node.checked;
key
=
pkey
;
key
=
pkey
;
node
.
children
&&
node
.
children
.
length
&&
updateChildren
(
node
.
children
,
isChecked
);
node
.
children
&&
node
.
children
.
length
&&
updateChildren
(
node
.
children
,
isChecked
);
}
else
if
(
node
.
children
&&
node
.
children
.
length
)
{
}
else
if
(
node
.
children
&&
node
.
children
.
length
)
{
...
@@ -178,7 +179,11 @@ const CustomTree = forwardRef(props => {
...
@@ -178,7 +179,11 @@ const CustomTree = forwardRef(props => {
}
}
}
}
key
=
pkey
;
key
=
pkey
;
node
.
indeterminate
=
!
node
.
checked
;
}
if
(
node
.
checked
)
{
node
.
indeterminate
=
false
;
}
else
if
(
node
.
children
&&
node
.
children
.
length
)
{
node
.
indeterminate
=
node
.
children
.
some
(
item
=>
item
.
checked
||
item
.
indeterminate
);
}
}
}
}
});
});
...
...
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