Merge pull request #9145 from dataease/pr@dev-v2@fix_history-label

Pr@dev v2@fix history label
This commit is contained in:
王嘉豪 2024-04-17 09:34:21 +08:00 committed by GitHub
commit a073b58a5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View File

@ -1082,7 +1082,7 @@ onMounted(() => {
.de-drag-right {
right: 1px;
top: 70px;
width: 16px;
width: 12px;
height: calc(100% - 110px);
}

View File

@ -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,