test tree

This commit is contained in:
2023-05-15 11:34:14 +08:00
parent d9e6e75275
commit d9e8704a6b
4 changed files with 12 additions and 6 deletions

View File

@@ -114,7 +114,9 @@ const isChildAllSelected = computed(() => {
for (const item of node.children) {
if (item.isChecked) childSelectNum++;
}
if (childSelectNum > 0) node.isChecked = true; //此处的处理与 checkedKeys 有关联
if(!props.selectParent){
if (childSelectNum > 0) node.isChecked = true; //此处的处理与 checkedKeys 有关联
}
if (childSelectNum == node.children.length) {
//继续递归向下判断
for (const item of node.children) {