From 50d5b8012906ec92b735648def998ff4d918f2f6 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Tue, 23 Jul 2024 15:13:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8B=E6=8B=89=E6=A0=91=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E6=90=9C=E7=B4=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v-query/QueryConditionConfiguration.vue | 13 ++++++----- .../src/custom-component/v-query/Tree.vue | 22 +++++++++++++------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue index 2ac068acce..d90288e706 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -790,12 +790,15 @@ const confirmClick = () => { : curComponent.value.multiple ) }) - queryElement.value.propValue = cloneDeep(conditions.value) - queryElement.value.cascade = cloneDeep(cascadeArr) - cascadeArr = [] - snapshotStore.recordSnapshotCache() + queryElement.value.propValue = [] nextTick(() => { - emits('queryData') + queryElement.value.cascade = cloneDeep(cascadeArr) + cascadeArr = [] + queryElement.value.propValue = cloneDeep(conditions.value) + snapshotStore.recordSnapshotCache() + nextTick(() => { + emits('queryData') + }) }) } diff --git a/core/core-frontend/src/custom-component/v-query/Tree.vue b/core/core-frontend/src/custom-component/v-query/Tree.vue index 57e584142c..065c296822 100644 --- a/core/core-frontend/src/custom-component/v-query/Tree.vue +++ b/core/core-frontend/src/custom-component/v-query/Tree.vue @@ -147,11 +147,12 @@ watch( }) } ) - +const showWholePath = ref(false) watch( () => config.value.multiple, val => { if (!props.isConfig) return + showWholePath.value = false if (val) { treeValue.value = [] } @@ -162,6 +163,9 @@ watch( treeValue.value = undefined }) } + nextTick(() => { + showWholePath.value = true + }) }) } ) @@ -191,6 +195,7 @@ const getTreeOption = debounce(() => { }) .finally(() => { loading.value = false + showWholePath.value = true }) }, 300) watch( @@ -215,13 +220,13 @@ const selectStyle = computed(() => { { @change="handleValueChange" :data="treeOptionList" check-strictly - showWholePath clearable :render-after-expand="false" - v-else-if="!loading" + v-else-if="!multiple && !loading" key="singleTree" + :showWholePath="showWholePath" :style="selectStyle" filterable /> @@ -245,7 +250,6 @@ const selectStyle = computed(() => { v-model="fakeValue" v-loading="loading" :data="[]" - showWholePath :render-after-expand="false" v-else key="fakeTree" @@ -253,4 +257,8 @@ const selectStyle = computed(() => { /> - +