-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
router.addRoutes 无效 #2370
Comments
getMenuList().then(res => { |
你好,请问这个问题怎么解决的? |
同问,解决方式是什么呢? |
修改layout/components/Sidebar/index.vue ,遍历路由生成菜单的时候不要使用siderbar,要使用permission_routes。 如果没看懂的话,可以vue-element-admin模板中的该文件,对比一下,就明白了。 |
问题解决了,但是刷新一下404 |
constantRoutes 里的404页面放到最后试一试。总之是 404页面要最后导入。 |
好了 404也解决了,放到asyncRoutes路由的最后面 |
我写的刷新后 404 的问题解决了,谢谢这个答案! |
感谢各位大佬,帮我解决问题了 |
1 similar comment
感谢各位大佬,帮我解决问题了 |
我焯,我找这答案找得好苦啊 |
Question(提问)
Steps to reproduce(问题复现步骤)
Screenshot or Gif(截图或动态图)
Link to minimal reproduction(最小可在线还原demo)
router.beforeEach:
动态菜单测试代码:
Other relevant information(格外信息)
The text was updated successfully, but these errors were encountered: