From 30316fcd49630dc9adb4f69e7af240e85c2c628c Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Wed, 3 Jul 2024 22:51:11 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=B8=8B=E6=8B=89=E6=A0=91=E8=A7=84=E5=88=99?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v-query/QueryConditionConfiguration.vue | 23 +++++++++++++++---- .../data/datasource/form/ApiVariable.vue | 13 +---------- 2 files changed, 19 insertions(+), 17 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 bba11ab4b7..72948e8c92 100644 --- a/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue +++ b/core/core-frontend/src/custom-component/v-query/QueryConditionConfiguration.vue @@ -252,6 +252,15 @@ const setTreeDefault = () => { } } const handleCheckedFieldsChange = (value: string[]) => { + handleDialogClick() + const checkedCount = value.length + checkAll.value = checkedCount === fields.value.length + isIndeterminate.value = checkedCount > 0 && checkedCount < fields.value.length + if (curComponent.value.displayType === '8') return + setType() +} + +const handleCheckedFieldsChangeTree = (value: string[]) => { handleDialogClick() const checkedCount = value.length checkAll.value = checkedCount === fields.value.length @@ -1008,8 +1017,8 @@ const showError = computed(() => { if (displayType === '9') { let displayField = null return checkedFields.some(id => { - const arr = fields.value.find(itx => itx.componentId === id) - const field = arr.id + const arr = (fields.value || []).find(itx => itx.componentId === id) + const field = arr?.id if (!field) return false if (displayField === null) { displayField = field @@ -1332,7 +1341,7 @@ defineExpose({
下拉树结构设计 - +
-