refactor: 留用 404 alias 同时移除 ErrorPage 路由 && 简化 redirect 路由 path
This commit is contained in:
parent
d716248736
commit
c5471b5fca
@ -17,7 +17,7 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: "/redirect/:path(.*)",
|
path: ":path(.*)",
|
||||||
component: () => import("@/views/redirect/index.vue")
|
component: () => import("@/views/redirect/index.vue")
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -286,14 +286,6 @@ export const dynamicRoutes: RouteRecordRaw[] = [
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "/:pathMatch(.*)*", // Must put the 'ErrorPage' route at the end, 必须将 'ErrorPage' 路由放在最后
|
|
||||||
redirect: "/404",
|
|
||||||
name: "ErrorPage",
|
|
||||||
meta: {
|
|
||||||
hidden: true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user