Selaa lähdekoodia

fix: less modify method

F-loat 7 vuotta sitten
vanhempi
commit
e9799a3368
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      src/components/SettingDarwer/index.js

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

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