This commit is contained in:
张成
2025-10-09 18:41:16 +08:00
parent bf0d15f4aa
commit fffdb69815
2 changed files with 40 additions and 8 deletions

View File

@@ -103,7 +103,6 @@ export default {
// 动态添加路由(重要!解决登录后点击菜单空白的问题)
if (window.rootVue && window.rootVue.$router) {
// 先移除旧的主路由(如果存在)
const router = window.rootVue.$router
const routes = router.options.routes
@@ -115,7 +114,7 @@ export default {
// 添加新的主路由
router.addRoute(mainMenu)
console.log('动态路由已添加')
console.log('动态路由已添加redirect 设置为:', mainMenu.redirect)
}
}
},