forked from github/dataease
Merge pull request #4098 from dataease/pr@dev@refactor_new-subject
refactor(仪表板): 新增默认仪表板主题
This commit is contained in:
commit
e7f04e8326
File diff suppressed because one or more lines are too long
@ -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 store from '@/store'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
@ -361,7 +361,13 @@ export function adaptCurTheme(customStyle, customAttr, chartType) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
customAttr['color'] = { ...canvasStyle.chartInfo.chartColor }
|
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) {
|
if (customStyle.background) {
|
||||||
delete customStyle.background
|
delete customStyle.background
|
||||||
}
|
}
|
||||||
@ -370,7 +376,7 @@ export function adaptCurTheme(customStyle, customAttr, chartType) {
|
|||||||
export function adaptCurThemeCommonStyle(component) {
|
export function adaptCurThemeCommonStyle(component) {
|
||||||
const commonStyle = store.state.canvasStyleData.chartInfo.chartCommonStyle
|
const commonStyle = store.state.canvasStyleData.chartInfo.chartCommonStyle
|
||||||
for (const key in commonStyle) {
|
for (const key in commonStyle) {
|
||||||
component.commonBackground[key] = commonStyle[key]
|
Vue.set(component.commonBackground, key, commonStyle[key])
|
||||||
}
|
}
|
||||||
if (isFilterComponent(component.component)) {
|
if (isFilterComponent(component.component)) {
|
||||||
const filterStyle = store.state.canvasStyleData.chartInfo.filterStyle
|
const filterStyle = store.state.canvasStyleData.chartInfo.filterStyle
|
||||||
|
Loading…
Reference in New Issue
Block a user