From a9654bbd456beafa172915afd3d758f66e69e441 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 10 Nov 2023 17:05:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E8=B5=84=E6=BA=90=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=A0=91=EF=BC=8C=E5=A6=82=E6=9E=9C=E5=AD=90=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=B1=95=E5=BC=80=E5=90=8E=E6=B2=A1=E6=9C=89=E6=94=B6=E8=B5=B7?= =?UTF-8?q?=EF=BC=8C=E9=82=A3=E4=B9=88=E4=B8=8A=E5=B1=82=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=94=B6=E8=B5=B7=E6=97=A0=E5=93=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/visualized/data/dataset/index.vue | 10 ++++++++-- .../src/views/visualized/data/datasource/index.vue | 8 ++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/core/core-frontend/src/views/visualized/data/dataset/index.vue b/core/core-frontend/src/views/visualized/data/dataset/index.vue index 2448dc9845..57ee7ac3f7 100644 --- a/core/core-frontend/src/views/visualized/data/dataset/index.vue +++ b/core/core-frontend/src/views/visualized/data/dataset/index.vue @@ -390,11 +390,15 @@ const menuList = [ const expandedKey = ref([]) const nodeExpand = data => { - expandedKey.value.push(data.id) + if (data.id) { + expandedKey.value.push(data.id) + } } const nodeCollapse = data => { - expandedKey.value = expandedKey.value.filter(ele => ele !== data.id) + if (data.id) { + expandedKey.value.splice(expandedKey.value.indexOf(data.id), 1) + } } const datasetTypeList = [ @@ -490,6 +494,8 @@ const getMenuList = (val: boolean) => { node-key="id" :data="state.datasetTree" :filter-node-method="filterNode" + expand-on-click-node + highlight-current @node-expand="nodeExpand" @node-collapse="nodeCollapse" :default-expanded-keys="expandedKey" diff --git a/core/core-frontend/src/views/visualized/data/datasource/index.vue b/core/core-frontend/src/views/visualized/data/datasource/index.vue index 5714104ade..8914524e3b 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/index.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/index.vue @@ -512,11 +512,15 @@ const updateApiDs = () => { } const nodeExpand = data => { - expandedKey.value.push(data.id) + if (data.id) { + expandedKey.value.push(data.id) + } } const nodeCollapse = data => { - expandedKey.value = expandedKey.value.filter(ele => ele !== data.id) + if (data.id) { + expandedKey.value.splice(expandedKey.value.indexOf(data.id), 1) + } } const filterNode = (value: string, data: BusiTreeNode) => { From acc88c2a524800a73974d75117adfb8f40cb847b Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 10 Nov 2023 17:23:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=88=9B=E5=BB=BA=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90-=E9=AB=98=E7=BA=A7=E8=AE=BE=E7=BD=AE-=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=B6=85=E6=97=B6=E7=9A=84=E4=B8=8A=E4=B8=8B=E5=B0=96?= =?UTF-8?q?=E5=A4=B4=E4=BD=8D=E7=BD=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datasource/form/EditorDetail.vue | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue b/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue index bbf32d13e4..5a102dcf47 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/form/EditorDetail.vue @@ -746,7 +746,7 @@ defineExpose({