From 65b411cd7dfb494986d8f9e5399a60fef74db33a Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Wed, 17 Apr 2024 09:32:51 +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=E5=AD=98=E9=87=8F=E6=8C=87=E6=A0=87=E5=8D=A1=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E8=AE=BE=E7=BD=AE=E5=B1=9E=E6=80=A7=E6=97=B6=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E5=9B=A0=E4=B8=BA=E7=BC=BA=E5=B0=91=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=BC=96=E8=BE=91=E5=8C=BA=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/store/modules/data-visualization/dvMain.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index 80a0214186..4342fcd17e 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -1,7 +1,11 @@ import { defineStore } from 'pinia' import { store } from '../../index' import { deepCopy } from '@/utils/utils' -import { BASE_VIEW_CONFIG } from '@/views/chart/components/editor/util/chart' +import { + BASE_VIEW_CONFIG, + DEFAULT_INDICATOR_NAME_STYLE, + DEFAULT_INDICATOR_STYLE +} from '@/views/chart/components/editor/util/chart' import { DEFAULT_CANVAS_STYLE_DATA_DARK, DEFAULT_CANVAS_STYLE_DATA_LIGHT, @@ -508,6 +512,12 @@ export const dvMainStore = defineStore('dataVisualization', { if (this.curBatchOptComponents.length === 1) { this.changeProperties.customAttr = viewBaseInfo.customAttr this.changeProperties.customStyle = viewBaseInfo.customStyle + // 补充历史指标卡缺失属性 + this.changeProperties.customAttr['indicator'] = + this.changeProperties.customAttr.indicator || deepCopy(DEFAULT_INDICATOR_STYLE) + this.changeProperties.customAttr['indicatorName'] = + this.changeProperties.customAttr.indicatorName || + deepCopy(DEFAULT_INDICATOR_NAME_STYLE) } this.batchOptComponents[id] = { properties: chartViewInstance.properties,