Merge pull request #4098 from dataease/pr@dev@refactor_new-subject

refactor(仪表板): 新增默认仪表板主题
This commit is contained in:
xuwei-fit2cloud 2022-12-15 14:56:32 +08:00 committed by GitHub
commit e7f04e8326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
import { sin, cos } from '@/components/canvas/utils/translate'
import { cos, sin } from '@/components/canvas/utils/translate'
import store from '@/store'
import Vue from 'vue'
@ -361,7 +361,13 @@ export function adaptCurTheme(customStyle, customAttr, chartType) {
}
}
customAttr['color'] = { ...canvasStyle.chartInfo.chartColor }
customStyle['text'] = { ...canvasStyle.chartInfo.chartTitle, title: customStyle['text']['title'], show: customStyle['text']['show'], remarkShow: customStyle['text']['remarkShow'], remark: customStyle['text']['remark'] }
customStyle['text'] = {
...canvasStyle.chartInfo.chartTitle,
title: customStyle['text']['title'],
show: customStyle['text']['show'],
remarkShow: customStyle['text']['remarkShow'],
remark: customStyle['text']['remark']
}
if (customStyle.background) {
delete customStyle.background
}
@ -370,7 +376,7 @@ export function adaptCurTheme(customStyle, customAttr, chartType) {
export function adaptCurThemeCommonStyle(component) {
const commonStyle = store.state.canvasStyleData.chartInfo.chartCommonStyle
for (const key in commonStyle) {
component.commonBackground[key] = commonStyle[key]
Vue.set(component.commonBackground, key, commonStyle[key])
}
if (isFilterComponent(component.component)) {
const filterStyle = store.state.canvasStyleData.chartInfo.filterStyle