Michael Wang 3 жил өмнө
parent
commit
5d0d2e9e1d

+ 4 - 1
src/features/UserLogin/UserLogin.vue

@@ -18,7 +18,7 @@ import ua from "@/utils/ua";
 import { decryptLogin, preloadResource } from "@/utils/utils";
 import { CloseCircleOutline, LockClosed, Person } from "@vicons/ionicons5";
 import { FormItemInst, FormRules } from "naive-ui";
-import { onMounted, watch } from "vue";
+import { onMounted, onUnmounted, watch } from "vue";
 import { useRouter } from "vue-router";
 import GeeTest from "./GeeTest.vue";
 import GlobalNotice from "./GlobalNotice.vue";
@@ -365,6 +365,9 @@ function closeApp() {
   });
   window.close();
 }
+
+// 登录页会收到很多消息,离开登录页时,都应该销毁掉
+onUnmounted(() => $message.destroyAll());
 </script>
 
 <template>