Преглед на файлове

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

free pan преди 5 години
родител
ревизия
5f2d28d533
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  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()
+    })
   })
 }