From 7930fd7bab127e392310ac3ccd9b3791bb784049 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 18 Apr 2024 10:14:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=96=87=E6=9C=AC=E6=90=9C=E7=B4=A2=E7=9A=84=E7=B2=BE?= =?UTF-8?q?=E7=A1=AE=E5=8C=B9=E9=85=8D=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/v-query/Component.vue | 11 +++++------ core/core-frontend/src/hooks/web/useFilter.ts | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue index cdce465881..00be249e12 100644 --- a/core/core-frontend/src/custom-component/v-query/Component.vue +++ b/core/core-frontend/src/custom-component/v-query/Component.vue @@ -293,12 +293,11 @@ const delQueryConfig = index => { const resetData = () => { ;(list.value || []).reduce((pre, next) => { - if (next.defaultConditionValueF?.length) { - next.conditionValueF = next.defaultConditionValueF - } - if (next.defaultConditionValueS?.length) { - next.conditionValueS = next.defaultConditionValueS - } + next.conditionValueF = next.defaultConditionValueF + next.conditionValueOperatorF = next.defaultConditionValueOperatorF + next.conditionValueS = next.defaultConditionValueS + next.conditionValueOperatorS = next.defaultConditionValueOperatorS + if (!next.defaultValueCheck) { next.defaultValue = next.multiple || +next.displayType === 7 ? [] : undefined } diff --git a/core/core-frontend/src/hooks/web/useFilter.ts b/core/core-frontend/src/hooks/web/useFilter.ts index 3be2a49fe6..4116247b81 100644 --- a/core/core-frontend/src/hooks/web/useFilter.ts +++ b/core/core-frontend/src/hooks/web/useFilter.ts @@ -154,7 +154,7 @@ const getOperator = ( const operatorS = firstLoad ? defaultConditionValueOperatorS : conditionValueOperatorS if (displayType === '8') { if (conditionType === 0) { - return defaultConditionValueOperatorF + return operatorF } const operatorArr = [valueF === '' ? '' : operatorF, valueS === '' ? '' : operatorS].filter( ele => ele !== ''