Explorar el Código

fix: less modify method

F-loat hace 7 años
padre
commit
e9799a3368
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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';