浏览代码

fix: less modify method

F-loat 7 年之前
父节点
当前提交
e9799a3368
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/components/SettingDarwer/index.js

+ 3 - 1
src/components/SettingDarwer/index.js

@@ -23,7 +23,9 @@ class SettingDarwer extends PureComponent {
   componentDidMount() {
   componentDidMount() {
     const { themeColor, colorWeak } = this.props.setting;
     const { themeColor, colorWeak } = this.props.setting;
     if (themeColor !== '#1890FF') {
     if (themeColor !== '#1890FF') {
-      this.colorChange(themeColor);
+      window.less.refresh().then(() => {
+        this.colorChange(themeColor);
+      });
     }
     }
     if (colorWeak === 'open') {
     if (colorWeak === 'open') {
       document.body.className = 'colorWeak';
       document.body.className = 'colorWeak';