Browse Source

fix(deps): 解决firefox下`正在切换主题`这个全局提示无法关闭的问题

free pan 5 years ago
parent
commit
5f2d28d533
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/components/SettingDrawer/settingConfig.js

+ 3 - 1
src/components/SettingDrawer/settingConfig.js

@@ -34,7 +34,9 @@ const colorList = [
 const updateTheme = newPrimaryColor => {
   const hideMessage = message.loading('正在切换主题!', 0)
   themeColor.changeColor(newPrimaryColor).finally(t => {
-    hideMessage()
+    setTimeout(() => {
+      hideMessage()
+    })
   })
 }