From e9799a3368f87e7f7ed8de705f6ab1e9303ac4d2 Mon Sep 17 00:00:00 2001 From: F-loat <945852046@qq.com> Date: Tue, 12 Jun 2018 20:31:43 +0800 Subject: [PATCH] fix: less modify method --- src/components/SettingDarwer/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/SettingDarwer/index.js b/src/components/SettingDarwer/index.js index 9988ae55..ac6ea172 100644 --- a/src/components/SettingDarwer/index.js +++ b/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'; -- GitLab