From b04eb0350b59a5a21dcb09f4ac64a089edc538dc Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Wed, 29 May 2024 14:08:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BE=85=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/pure/ms-table/useTable.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/src/components/pure/ms-table/useTable.ts b/frontend/src/components/pure/ms-table/useTable.ts index 09c5aecd9a..ded13b3d33 100644 --- a/frontend/src/components/pure/ms-table/useTable.ts +++ b/frontend/src/components/pure/ms-table/useTable.ts @@ -456,7 +456,7 @@ export default function useTableProps( propsRes.value.selectorStatus = v; } }, - + // TODO: 待优化逻辑 // 表格行的选中/取消事件 rowSelectChange: (record: MsTableDataItem) => { const { rowKey } = propsRes.value; @@ -503,15 +503,12 @@ export default function useTableProps( 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);