fix: delete realPath

This commit is contained in:
xiaoxian521 2021-12-21 10:34:28 +08:00
parent 955b76f30a
commit 903e298951
4 changed files with 3 additions and 11 deletions

View File

@ -99,7 +99,6 @@ const tabsRouter = {
showLink: false, showLink: false,
i18n: false, i18n: false,
dynamicLevel: 3, dynamicLevel: 3,
realPath: "/tabs/detail",
refreshRedirect: "/tabs/index" refreshRedirect: "/tabs/index"
} }
} }

View File

@ -44,7 +44,6 @@ import {
ElCollapse, ElCollapse,
ElCollapseItem, ElCollapseItem,
ElTreeV2, ElTreeV2,
ElColorPicker,
// 指令 // 指令
ElLoading, ElLoading,
ElInfiniteScroll ElInfiniteScroll
@ -97,8 +96,7 @@ const components = [
ElEmpty, ElEmpty,
ElCollapse, ElCollapse,
ElCollapseItem, ElCollapseItem,
ElTreeV2, ElTreeV2
ElColorPicker
]; ];
// https://element-plus.org/zh-CN/component/icon.html // https://element-plus.org/zh-CN/component/icon.html

View File

@ -216,11 +216,7 @@ const addAsyncRoutes = (arrRoutes: Array<RouteRecordRaw>) => {
if (v.redirect) { if (v.redirect) {
v.component = Layout; v.component = Layout;
} else { } else {
if (v.meta.realPath) { v.component = modulesRoutes[`/src/views${v.path}/index.vue`];
v.component = modulesRoutes[`/src/views${v.meta.realPath}/index.vue`];
} else {
v.component = modulesRoutes[`/src/views${v.path}/index.vue`];
}
} }
if (v.children) { if (v.children) {
addAsyncRoutes(v.children); addAsyncRoutes(v.children);

View File

@ -17,8 +17,7 @@ function toDetail(index: number) {
title: { zh: `No.${index} - 详情信息`, en: `No.${index} - DetailInfo` }, title: { zh: `No.${index} - 详情信息`, en: `No.${index} - DetailInfo` },
showLink: false, showLink: false,
i18n: false, i18n: false,
dynamicLevel: 3, dynamicLevel: 3
realPath: "/tabs/detail"
} }
}); });
router.push({ name: "tabDetail", query: { id: String(index) } }); router.push({ name: "tabDetail", query: { id: String(index) } });