From 788feb4d4671a14bad84346e0588766b62896063 Mon Sep 17 00:00:00 2001 From: "hong.yang" Date: Wed, 27 Sep 2023 13:38:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=A4=84=E7=90=86=EF=BC=8C=E5=BD=93=E5=8F=91?= =?UTF-8?q?=E7=8E=B0=E6=95=B0=E6=8D=AE=E9=9B=86=E5=8F=82=E6=95=B0=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=97=B6=EF=BC=8C=E4=B9=9F=E6=8A=8A=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=AD=E4=BF=9D=E5=AD=98=E7=9A=84=E5=8F=82=E6=95=B0=E7=A7=BB?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化组件参数处理,当发现数据集参数删除时,也把组件中保存的参数移除 --- .../packages/BigScreenDesign/RightSetting/DataSetting.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue b/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue index 7ca5f74f..f91c0116 100644 --- a/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue +++ b/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue @@ -750,10 +750,12 @@ export default { this.fieldsList = res.fields // 初始化时以组件本来的参数设置为主 if (type === 'initial') { + let deleteKeys = [] for (const key in this.config.dataSource.params) { const param = res?.params?.find(field => field.name === key) // 如果组件参数在数据集中找不到,说明参数已经被删除,不需要再显示 if (param) { + deleteKeys.push(key) this.params.push({ name: key, value: this.config.dataSource.params[key], @@ -762,6 +764,9 @@ export default { }) } } + deleteKeys.forEach(key => { + delete this.config.dataSource.params[key] + }) } else { this.params = res.params }