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,
i18n: false,
dynamicLevel: 3,
realPath: "/tabs/detail",
refreshRedirect: "/tabs/index"
}
}

View File

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

View File

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

View File

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