This commit is contained in:
zhoumengru
2025-09-10 09:23:53 +08:00
7 changed files with 19 additions and 23 deletions

View File

@@ -149,15 +149,15 @@ export default {
})
},
initRoute() {
console.log(localStorage.getItem('user'), "localStorage.getItem('user')")
console.log(localStorage.getItem('permission'), "localStorage.getItem('permission')")
// 执行过滤
// const filteredRoutes = this.filterRoutes(
// this.menuList,
// JSON.parse(localStorage.getItem('user'))
// JSON.parse(localStorage.getItem('permission'))
// )
console.log( this.$route.matched, 'filteredRoutes')
this.subMenu = this.$route.matched[1].children || []
// this.menuList= JSON.parse(localStorage.getItem('user'))
// this.menuList= JSON.parse(localStorage.getItem('permission'))
// this.subMenu =filteredRoutes[0].children||[]
this.currentKey = '/' + this.$route.fullPath.split('/')[1]