From 1a0bcd4443da76be4f4769a4d865a2529da8f5a4 Mon Sep 17 00:00:00 2001 From: dingxs Date: Mon, 19 Jun 2023 14:39:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=94=A8in=E5=88=A4=E6=96=AD=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E6=98=AF=E5=90=A6=E5=85=B7=E6=9C=89=E6=9F=90=E4=B8=AA?= =?UTF-8?q?=E7=89=B9=E5=AE=9A=E7=9A=84key=EF=BC=8C=E8=80=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=AFvalue=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=BD=93value?= =?UTF-8?q?=E4=B8=BAnull=E6=97=B6=E6=B0=B8=E8=BF=9C=E5=BE=97=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useChartInteract.hook.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hooks/useChartInteract.hook.ts b/src/hooks/useChartInteract.hook.ts index aa0b1ed6..dce0d25b 100644 --- a/src/hooks/useChartInteract.hook.ts +++ b/src/hooks/useChartInteract.hook.ts @@ -30,10 +30,10 @@ export const useChartInteract = ( const { Params, Header } = toRefs(chartEditStore.requestGlobalConfig.requestDataPond[globalConfigPindAprndex].dataPondRequestConfig.requestParams) Object.keys(item.interactFn).forEach(key => { - if (Params.value[key]) { + if (key in Params.value) { Params.value[key] = param[item.interactFn[key]] } - if (Header.value[key]) { + if (key in Header.value) { Header.value[key] = param[item.interactFn[key]] } }) @@ -43,10 +43,10 @@ export const useChartInteract = ( const { Params, Header } = toRefs(chartEditStore.componentList[index].request.requestParams) Object.keys(item.interactFn).forEach(key => { - if (Params.value[key]) { + if (key in Params.value) { Params.value[key] = param[item.interactFn[key]] } - if (Header.value[key]) { + if (key in Header.value) { Header.value[key] = param[item.interactFn[key]] } })