|
@@ -102,7 +102,6 @@ const permission = {
|
|
|
const topRoutes = state.topbarRouters
|
|
|
const ancestors = { fullMatched: false, matches: [] }
|
|
|
let targetPath = to.path
|
|
|
- debugger
|
|
|
traceAncestorRoutesInMenus(topRoutes, targetPath, ancestors)
|
|
|
if (!ancestors.fullMatched && to.meta?.parentPath) {
|
|
|
targetPath = to.meta.parentPath
|
|
@@ -224,6 +223,7 @@ function handleAsyncRouterLocalReference(route, parent, level) {
|
|
|
// 属性挂在meta上可以不受匹配方法等因素的影响,最大限度保留设置
|
|
|
route.meta = route.meta || {}
|
|
|
// 挂parent可逆向追溯, 不能挂反向引用vuex内部会深拷贝!
|
|
|
+ // route.parent = parent
|
|
|
route.meta.parentPath = parent?.path || ''
|
|
|
// 挂level可直接定位top/middle/side
|
|
|
route.meta.level = level
|