test tree
This commit is contained in:
parent
d9e6e75275
commit
d9e8704a6b
@ -80,8 +80,10 @@ const _sfc_main$1 = defineComponent({
|
||||
if (item.isChecked)
|
||||
childSelectNum++;
|
||||
}
|
||||
if (!props.selectParent) {
|
||||
if (childSelectNum > 0)
|
||||
node.isChecked = true;
|
||||
}
|
||||
if (childSelectNum == node.children.length) {
|
||||
for (const item of node.children) {
|
||||
res = _isChildAllSelected(item);
|
||||
|
@ -17677,8 +17677,10 @@ const _sfc_main$K = defineComponent({
|
||||
if (item.isChecked)
|
||||
childSelectNum++;
|
||||
}
|
||||
if (!props.selectParent) {
|
||||
if (childSelectNum > 0)
|
||||
node.isChecked = true;
|
||||
}
|
||||
if (childSelectNum == node.children.length) {
|
||||
for (const item of node.children) {
|
||||
res = _isChildAllSelected(item);
|
||||
|
@ -114,7 +114,9 @@ const isChildAllSelected = computed(() => {
|
||||
for (const item of node.children) {
|
||||
if (item.isChecked) childSelectNum++;
|
||||
}
|
||||
if(!props.selectParent){
|
||||
if (childSelectNum > 0) node.isChecked = true; //此处的处理与 checkedKeys 有关联
|
||||
}
|
||||
if (childSelectNum == node.children.length) {
|
||||
//继续递归向下判断
|
||||
for (const item of node.children) {
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user