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

为什么在路由守卫里必须给定角色并传入store中? #4234

Open
nanhaibo opened this issue Apr 24, 2024 · 1 comment
Open

为什么在路由守卫里必须给定角色并传入store中? #4234

nanhaibo opened this issue Apr 24, 2024 · 1 comment

Comments

@nanhaibo
Copy link

今天拉取了框架,在运行时没有给角色,并且注释了守卫那里的 user/getInfo 一行,结果页面陷入死循环卡死。然后写死了在里面写死roles=[“admin”],传入generateRoutes,页面继续卡死,报错 Duplicate named routes definition……
最后发现必须有角色,并且还要赋值给store里的roles,不然就卡死,这是为什么呢?麻烦大家解释一下,十分感谢
3BB1B63A-4D6D-4B74-B083-7433E6302F8B

@do-doing
Copy link

那我反问你了,如果这个账号没角色,那他应该看到什么。

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