diff --git a/App.vue b/App.vue index 9082bcf5..977df456 100644 --- a/App.vue +++ b/App.vue @@ -1775,8 +1775,36 @@ // 引入主题 require_theme() { let theme = this.get_theme_value(); - // import `@/common/theme/theme-${mode}.scss`; //记住不能import哦 - require(`./common/css/theme/${theme}.css`); + // import `@/common/css/theme/${theme}.css`; //记住不能import哦 + switch (theme) { + case 'yellow': + require(`@/common/css/theme/yellow.css`); + break; + case 'red': + require(`@/common/css/theme/red.css`); + break; + case 'black': + require(`@/common/css/theme/black.css`); + break; + case 'green': + require(`@/common/css/theme/green.css`); + break; + case 'orange': + require(`@/common/css/theme/orange.css`); + break; + case 'blue': + require(`@/common/css/theme/blue.css`); + break; + case 'brown': + require(`@/common/css/theme/brown.css`); + break; + case 'purple': + require(`@/common/css/theme/purple.css`); + break; + default: + require(`@/common/css/theme/red.css`); + break; + } }, // 获取主题色值 @@ -1804,7 +1832,7 @@ purple_light: '#d6cbfb', // 紫色 }; var theme = this.get_theme_value(); - if(is_light) { + if (is_light) { theme += '_light'; } return color_obj[theme]; @@ -1900,5 +1928,5 @@ @import './common/css/business.css'; @import './common/css/plugins.css'; @import './common/css/lib.css'; - @import './common/css/theme/yellow.css'; + /* @import './common/css/theme/yellow.css'; */