fix: 二级以上路由添加affix只保存后两级的path导致打开失败

This commit is contained in:
laurenting 2021-04-24 09:34:52 +08:00
parent 33a93a12b4
commit 4b6f91b7e0
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ export default {
}) })
} }
if (route.children) { if (route.children) {
const tempTags = this.filterAffixTags(route.children, route.path) const tempTags = this.filterAffixTags(route.children, path.resolve(basePath, route.path))
if (tempTags.length >= 1) { if (tempTags.length >= 1) {
tags = [...tags, ...tempTags] tags = [...tags, ...tempTags]
} }

View File

@ -42,7 +42,7 @@ const nestedRouter = {
path: 'menu1-2-2', path: 'menu1-2-2',
component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'), component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
name: 'Menu1-2-2', name: 'Menu1-2-2',
meta: { title: 'Menu 1-2-2' } meta: { title: 'Menu 1-2-2', affix: true }
} }
] ]
}, },