feat:修改切换主题报错问题

main
liu.shiyi
parent ead0a04d8d
commit e98eb89cd2

@ -81,9 +81,9 @@ export default {
// //
config.theme = settingToTheme(_.cloneDeep(config), this.customTheme) config.theme = settingToTheme(_.cloneDeep(config), this.customTheme)
this.changeChartConfig(config) this.changeChartConfig(config)
if (config.code === this.activeCode) { // if (config.code === this.activeCode) {
this.changeActiveItemConfig(config) // this.changeActiveItemConfig(config)
} // }
} }
} }
} }

@ -27,7 +27,8 @@ export function settingToTheme (config, type) {
for (const item in config.customize) { for (const item in config.customize) {
const value = config.customize[item]; const value = config.customize[item];
//如果包含二级属性 //如果包含二级属性
if (typeof value === 'object' && Object.keys(value).length){ debugger
if (value && typeof value === 'object' && Object.keys(value).length){
// 对于二级属性 // 对于二级属性
for (const subKey in value) { for (const subKey in value) {
if (subKey.includes('color') || subKey.includes('Color') || subKey.includes('BGC')){ if (subKey.includes('color') || subKey.includes('Color') || subKey.includes('BGC')){

Loading…
Cancel
Save