perf: storage tags

This commit is contained in:
lrl
2021-11-27 19:04:14 +08:00
parent 6d3a8c5a88
commit be3a8a6949
3 changed files with 56 additions and 43 deletions

View File

@@ -231,9 +231,10 @@ router.beforeEach((to, _from, next) => {
// 刷新
if (usePermissionStoreHook().wholeRoutes.length === 0)
initRouter(name.username).then((router: Router) => {
useMultiTagsStoreHook().getMultiTagsCache
? router.push(to.path)
: router.push("/");
if (!useMultiTagsStoreHook().getMultiTagsCache) {
return router.push("/");
}
router.push(to.path);
// 刷新页面更新标签栏与页面路由匹配
const localRoutes = storageLocal.getItem("responsive-tags");
const optionsRoutes = router.options?.routes;