fix(仪表板): 适配历史主题不支持仪表板背景透明度设置问题

This commit is contained in:
wangjiahao 2024-04-03 11:19:08 +08:00
parent 83ca56bd75
commit 7e94fe3892
2 changed files with 2 additions and 0 deletions

View File

@ -192,6 +192,7 @@ const data = {
if (style) { if (style) {
style['selfAdaption'] = true style['selfAdaption'] = true
} }
style.panel['alpha'] = style.panel['alpha'] === undefined ? 100 : style.panel['alpha']
state.canvasStyleData = style state.canvasStyleData = style
}, },

View File

@ -242,6 +242,7 @@ export default {
// //
this.canvasStyleData.chartInfo.chartCommonStyle.backgroundColorSelect = true this.canvasStyleData.chartInfo.chartCommonStyle.backgroundColorSelect = true
this.canvasStyleData.panel.backgroundType = 'color' this.canvasStyleData.panel.backgroundType = 'color'
this.canvasStyleData.panel['alpha'] = 100
if (this.overallSettingForm.panel.themeColor === 'light') { if (this.overallSettingForm.panel.themeColor === 'light') {
this.canvasStyleData.panel.color = deepCopy(LIGHT_THEME_PANEL_BACKGROUND) this.canvasStyleData.panel.color = deepCopy(LIGHT_THEME_PANEL_BACKGROUND)
this.canvasStyleData.chartInfo.chartCommonStyle.color = deepCopy(LIGHT_THEME_COMPONENT_BACKGROUND) this.canvasStyleData.chartInfo.chartCommonStyle.color = deepCopy(LIGHT_THEME_COMPONENT_BACKGROUND)