Forráskód Böngészése

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

liu.shiyi 1 éve
szülő
commit
e98eb89cd2

+ 3 - 3
data-room-ui/packages/BasicComponents/Input/index.vue

@@ -81,9 +81,9 @@ export default {
       // 样式改变时更新主题配置
       config.theme = settingToTheme(_.cloneDeep(config), this.customTheme)
       this.changeChartConfig(config)
-      if (config.code === this.activeCode) {
-        this.changeActiveItemConfig(config)
-      }
+      // if (config.code === this.activeCode) {
+      //   this.changeActiveItemConfig(config)
+      // }
     }
   }
 }

+ 2 - 1
data-room-ui/packages/js/utils/themeFormatting.js

@@ -27,7 +27,8 @@ export function settingToTheme (config, type) {
         for (const item in config.customize) {
           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) {
               if (subKey.includes('color') || subKey.includes('Color') || subKey.includes('BGC')){