From 9e1a17b11d5a62e393ff6b955754ae957ea78f4f Mon Sep 17 00:00:00 2001 From: "hong.yang" Date: Tue, 26 Sep 2023 17:31:48 +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=E6=98=BE=E7=A4=BA=EF=BC=8C=E5=BD=93=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=B7=B2=E7=BB=8F=E4=BB=8E=E6=95=B0=E6=8D=AE=E9=9B=86?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=B6=EF=BC=8C=E7=BB=84=E4=BB=B6=E4=B8=8D?= =?UTF-8?q?=E5=9C=A8=E6=98=BE=E7=A4=BA=E5=88=A0=E9=99=A4=E7=9A=84=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化组件参数显示,当参数已经从数据集删除时,组件不在显示删除的参数 --- .../BigScreenDesign/RightSetting/DataSetting.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue b/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue index 46b73d90..7ca5f74f 100644 --- a/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue +++ b/data-room-ui/packages/BigScreenDesign/RightSetting/DataSetting.vue @@ -752,12 +752,15 @@ export default { if (type === 'initial') { for (const key in this.config.dataSource.params) { const param = res?.params?.find(field => field.name === key) - this.params.push({ - name: key, - value: this.config.dataSource.params[key], - type: param?.type, - remark: param?.remark - }) + // 如果组件参数在数据集中找不到,说明参数已经被删除,不需要再显示 + if (param) { + this.params.push({ + name: key, + value: this.config.dataSource.params[key], + type: param?.type, + remark: param?.remark + }) + } } } else { this.params = res.params