This commit is contained in:
@@ -734,15 +734,15 @@
|
||||
const getLeftCheckedKeysWithHalf = (): number[] => {
|
||||
if (!leftTreeRef.value) return []
|
||||
const checkedKeys = leftTreeRef.value.getCheckedKeys(false)
|
||||
const parentIds = new Set<number>()
|
||||
const allIds = new Set<number>(checkedKeys)
|
||||
|
||||
// 为每个勾选的节点找到所有父节点
|
||||
checkedKeys.forEach((key: number) => {
|
||||
const parents = getParentNodeIds(key)
|
||||
parents.forEach(parentId => parentIds.add(parentId))
|
||||
parents.forEach(parentId => allIds.add(parentId))
|
||||
})
|
||||
|
||||
return [...checkedKeys, ...Array.from(parentIds)]
|
||||
return Array.from(allIds)
|
||||
}
|
||||
|
||||
// 添加权限
|
||||
|
||||
Reference in New Issue
Block a user