Explorar el Código

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

free pan hace 5 años
padre
commit
5f2d28d533
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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()
+    })
   })
 }