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

动态异步路由问题 #45

Open
chenshu-97 opened this issue Jul 21, 2023 · 1 comment
Open

动态异步路由问题 #45

chenshu-97 opened this issue Jul 21, 2023 · 1 comment

Comments

@chenshu-97
Copy link

菜单部分的渲染数据是在应用启动时就通过静态路由渲染了,那动态路由的菜单渲染怎么做呢

@xusenlin
Copy link
Owner

可以将全部路由通过后端权限来动态添加。使用router.addRoute({ path: '/about', component: About })
具体参考教程:https://router.vuejs.org/zh/guide/advanced/dynamic-routing.html#%E6%B7%BB%E5%8A%A0%E8%B7%AF%E7%94%B1

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