From 1d08e576645510080336d5b6dc103fcbb6d389e8 Mon Sep 17 00:00:00 2001 From: teukkk Date: Wed, 13 Nov 2024 17:51:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=84=E4=BB=B6MsTreeSelect=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=80=89=E6=8B=A9=E5=BD=93=E5=89=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ms-associate-case/useTreeSelection.ts | 1 + .../src/components/business/ms-tree/index.vue | 2 +- .../components/pure/ms-tree-select/index.vue | 242 ++++++++++++++---- .../management/api/createShareModal.vue | 1 + 4 files changed, 190 insertions(+), 56 deletions(-) diff --git a/frontend/src/components/business/ms-associate-case/useTreeSelection.ts b/frontend/src/components/business/ms-associate-case/useTreeSelection.ts index d17a78aedc..931b6b96e0 100644 --- a/frontend/src/components/business/ms-associate-case/useTreeSelection.ts +++ b/frontend/src/components/business/ms-associate-case/useTreeSelection.ts @@ -171,6 +171,7 @@ export default function useTreeSelection(selectedModuleProps: SelectedModuleProp Object.keys(selectedModulesMaps.value).forEach((key) => { delete selectedModulesMaps.value[key]; }); + checkedKeys.value = []; isCheckedAll.value = false; } diff --git a/frontend/src/components/business/ms-tree/index.vue b/frontend/src/components/business/ms-tree/index.vue index 8780b37ed0..7900861409 100644 --- a/frontend/src/components/business/ms-tree/index.vue +++ b/frontend/src/components/business/ms-tree/index.vue @@ -322,7 +322,7 @@ filterTreeData.value = data.value; } nextTick(() => { - treeRef.value?.expandAll(false); + treeRef.value?.expandAll(props.defaultExpandAll ?? false); }); } else { updateDebouncedSearch(); diff --git a/frontend/src/components/pure/ms-tree-select/index.vue b/frontend/src/components/pure/ms-tree-select/index.vue index f08f18cf14..ba0bb3fa3e 100644 --- a/frontend/src/components/pure/ms-tree-select/index.vue +++ b/frontend/src/components/pure/ms-tree-select/index.vue @@ -1,80 +1,168 @@