修复 菜单管理 同名 导致路由问题

This commit is contained in:
吕金泽
2022-06-27 22:43:27 +08:00
parent a74b8009d7
commit a303950eee
4 changed files with 11 additions and 8 deletions
+3
View File
@@ -0,0 +1,3 @@
<template>
空页面
</template>
+3 -3
View File
@@ -8,17 +8,17 @@
>
<el-tab-pane
v-for="(view, key) in global.visitedViews" :key="key"
:label="view.name"
:label="view.meta.title"
:name="view.path"
:closable="!(view.path == '/home')"
>
<template #label>
<el-dropdown trigger="contextmenu">
<div class="el-tabs__item is-top is-closable is-focus" style="padding: 0px;" v-if="$route.path != view.path">
{{ view.name }}
{{ view.meta.title }}
</div>
<div class="el-tabs__item is-top is-active is-closable is-focus" style="padding: 0px;" v-else>
{{ view.name }}
{{ view.meta.title }}
</div>
<template #dropdown>
<el-dropdown-menu>
@@ -17,8 +17,8 @@ export const filterAsyncRouter = (routers, level) => {
router.path = "/" + common.uuid()
router.component = level > 0 ? layoutModules[`../layout/none.vue`] : loadLayoutView(component)
} else {
router.path = router.path = router.path.startsWith('/') ? router.path : '/' + router.path
router.component = loadView(component)
router.path = router.path.startsWith('/') ? router.path : '/' + router.path
router.component = loadView(component) || layoutModules[`../layout/empty.vue`]
}
}
if (router.children && router.children.length) {