fix: update

This commit is contained in:
xiaoxian521
2021-11-27 10:05:36 +08:00
parent 8c31ca1bad
commit b65b972353
7 changed files with 95 additions and 64 deletions

View File

@@ -232,9 +232,7 @@ router.beforeEach((to, _from, next) => {
initRouter(name.username).then((router: Router) => {
router.push(to.path);
// 刷新页面更新标签栏与页面路由匹配
const localRoutes = storageLocal.getItem(
"responsive-routesInStorage"
);
const localRoutes = storageLocal.getItem("responsive-tags");
const optionsRoutes = router.options?.routes;
const newLocalRoutes = [];
optionsRoutes.forEach(ors => {
@@ -245,7 +243,7 @@ router.beforeEach((to, _from, next) => {
});
});
storageLocal.setItem(
"responsive-routesInStorage",
"responsive-tags",
uniqBy(newLocalRoutes, "path")
);
});