Skip to content
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

动态添加的路由怎么指定位置 #3103

Closed
zhujinhu21 opened this issue Apr 10, 2020 · 3 comments
Closed

动态添加的路由怎么指定位置 #3103

zhujinhu21 opened this issue Apr 10, 2020 · 3 comments

Comments

@zhujinhu21
Copy link

Question(提问)

根据权限动态添加的路由怎么指定位置,不是放在最下面

Steps to reproduce(问题复现步骤)

Screenshot or Gif(截图或动态图)

Link to minimal reproduction(最小可在线还原demo)

Other relevant information(格外信息)

  • Your OS:
  • Node.js version:
  • vue-element-admin version:
@zhujinhu21 zhujinhu21 changed the title 动态路由指定位置 动态路由怎么指定位置 Apr 10, 2020
@zhujinhu21 zhujinhu21 changed the title 动态路由怎么指定位置 动态添加的路由怎么指定位置 Apr 10, 2020
@SuperZiLu
Copy link

大佬怎么解决的?我也遇到这个问题 用了router.addRoutes(accessRoutes)这个方法之后 添加进去的路由显示在最后面

@zhujinhu21
Copy link
Author

没有解决,我是吧所有的菜单都加到权限中

@SuperZiLu
Copy link

哈哈哈 我也是 把侧边栏显示出来的菜单都加到这个asyncRouter数组里去让他一起筛选 这样顺序还是按数组里面先后去显示的 也不知道这样干是不是合理。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants