mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2026-01-26 17:02:00 +08:00
fix: router
This commit is contained in:
@@ -216,7 +216,11 @@ const addAsyncRoutes = (arrRoutes: Array<RouteRecordRaw>) => {
|
||||
if (v.redirect) {
|
||||
v.component = Layout;
|
||||
} else {
|
||||
v.component = modulesRoutes[`/src/views${v.path}/index.vue`];
|
||||
if (v.meta.realPath) {
|
||||
v.component = modulesRoutes[`/src/views${v.meta.realPath}/index.vue`];
|
||||
} else {
|
||||
v.component = modulesRoutes[`/src/views${v.path}/index.vue`];
|
||||
}
|
||||
}
|
||||
if (v.children) {
|
||||
addAsyncRoutes(v.children);
|
||||
|
||||
Reference in New Issue
Block a user