mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-01 03:28:59 +08:00
fix: 待优化代码标记
This commit is contained in:
parent
8d08a8aff3
commit
b04eb0350b
@ -456,7 +456,7 @@ export default function useTableProps<T>(
|
||||
propsRes.value.selectorStatus = v;
|
||||
}
|
||||
},
|
||||
|
||||
// TODO: 待优化逻辑
|
||||
// 表格行的选中/取消事件
|
||||
rowSelectChange: (record: MsTableDataItem<T>) => {
|
||||
const { rowKey } = propsRes.value;
|
||||
@ -503,15 +503,12 @@ export default function useTableProps<T>(
|
||||
const includeCurrentIds = [key, ...childrenIds];
|
||||
// 当前父节点已选中,取消选择父节点和父节点下所有子节点
|
||||
if (isSelectAllChildren) {
|
||||
// childrenIds.push(key);
|
||||
includeCurrentIds.forEach((id) => {
|
||||
selectedKeys.delete(id);
|
||||
});
|
||||
includeCurrentIds.forEach((id) => {
|
||||
excludeKeys.add(id);
|
||||
});
|
||||
// selectedKeys.delete(key);
|
||||
// excludeKeys.add(key);
|
||||
// 未选中则全选父节点和下边所有子节点
|
||||
} else {
|
||||
selectedKeys.add(key);
|
||||
|
Loading…
Reference in New Issue
Block a user