Browse Source

perf: 清空缓存并返回登录页时添加重置路由 (#329)

Co-authored-by: xiaoxian521 <1923740402@qq.com>
newives 2 years ago
parent
commit
0e76bd4aac
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/layout/components/setting/index.vue

+ 2 - 0
src/layout/components/setting/index.vue

@@ -12,6 +12,7 @@ import { getConfig } from "/@/config";
 import { useRouter } from "vue-router";
 import panel from "../panel/index.vue";
 import { emitter } from "/@/utils/mitt";
+import { resetRouter } from "/@/router";
 import { templateRef } from "@vueuse/core";
 import { routerArrays } from "/@/layout/types";
 import { useNav } from "/@/layout/hooks/useNav";
@@ -140,6 +141,7 @@ function onReset() {
   useMultiTagsStoreHook().handleTags("equal", [...routerArrays]);
   storageLocal.clear();
   storageSession.clear();
+  resetRouter();
 }
 
 function onChange(label) {