We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
你好,我最近在做vue的路由权限控制,参考了你的文章和代码,有写地方看不懂,想请教一下哈。
1.想问一下代码中好像没有体现到路由权限控制这一部分,想问一下这个怎么实现 路由中定义是否需要验证权限:meta:{ auth :true } 就是这个地方,想问一下怎么判断当前角色是否有权限可以访问这个界面
The text was updated successfully, but these errors were encountered:
简而言之就是根据接口返回的modules,判断当前路由的name是否存在modules,不存在则就跳转登录页等操作
路由钩子里判断一下即可
Sorry, something went wrong.
好的,万分感谢哈,我回去试试看哈,谢谢
翻车了,刚刚判断写错了,参考思路即可~
No branches or pull requests
你好,我最近在做vue的路由权限控制,参考了你的文章和代码,有写地方看不懂,想请教一下哈。
1.想问一下代码中好像没有体现到路由权限控制这一部分,想问一下这个怎么实现
路由中定义是否需要验证权限:meta:{ auth :true }
就是这个地方,想问一下怎么判断当前角色是否有权限可以访问这个界面
The text was updated successfully, but these errors were encountered: