mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
fix: router
This commit is contained in:
parent
81bf66eca9
commit
b961659c2f
@ -111,8 +111,8 @@ router.beforeEach((to: toRouteType, _from, next) => {
|
|||||||
: router.options.routes;
|
: router.options.routes;
|
||||||
const route = findRouteByPath(path, routes);
|
const route = findRouteByPath(path, routes);
|
||||||
const routePartent = getParentPaths(path, routes);
|
const routePartent = getParentPaths(path, routes);
|
||||||
// 未开启标签页缓存,刷新页面重定向到顶级路由(参考标签页操作例子,只针对动态路由)
|
// 未开启标签页缓存,刷新页面重定向到顶级路由(参考标签页操作例子,只针对动态路由
|
||||||
if (routePartent.length === 0) {
|
if (path !== routes[0].path && routePartent.length === 0) {
|
||||||
const { name, meta } = findRouteByPath(
|
const { name, meta } = findRouteByPath(
|
||||||
route?.meta?.refreshRedirect,
|
route?.meta?.refreshRedirect,
|
||||||
routes
|
routes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user