perf: multiTags route delete realPath

This commit is contained in:
lrl
2021-12-20 22:14:26 +08:00
committed by 啝裳
parent 3af52cf6c4
commit 1b052023b6
4 changed files with 10 additions and 11 deletions

View File

@@ -89,7 +89,7 @@ router.beforeEach((to: toRouteType, _from, next) => {
});
};
// 未开启标签页缓存,刷新页面重定向到顶级路由(参考标签页操作例子,只针对静态路由)
if (to.meta?.realPath) {
if (to.meta?.dynamicLevel) {
const routes = router.options.routes;
const { refreshRedirect } = to.meta;
const { name, meta } = findRouteByPath(refreshRedirect, routes);