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
在路由配置角色验证
{ path: 'demo', name: '演示页', meta: { icon: 'file-ppt', authority: { role: 'test', } }, component: () => import('@/pages/demo') }
加载菜单仍然会显示,经过筛查,发现 hasPermission方法权限验证通过了,由于 route.meta.pAuthorities 给了 * 的权限,现在想用角色来实现菜单权限控制有什么好的解决办法? 我目前想到的解决办法是在 routerUtil.js文件中在给pAuthorities 赋值时判断 authority 中是否存在 role 限制, 如果存在赋值 pAuthorities 下 permission 值为空字符串,目前测试可以实现预期效果,请问是否有其他方式解决这个问题
The text was updated successfully, but these errors were encountered:
我是按照官网里面的东西进行调整了的
路由: role: { name: '角色管理', path: 'role_manage', component: () => import('@/pages/system/role_manage') }
后端返回菜单:
{ "router":"role", "authority":{ "permission":"role" } }
后端返回权限: { "id":"role", "operation":[ "query", "delete", "edit", "add" ] }
basic原来的校验js稍微改动了下
然后再用的v-auth
我不是写前端的,不知道你们写前端的是不是这样的,我是现在能和官网说的那样子实现粒度级权限控制
Sorry, something went wrong.
我是通过修改源码,把读取路由变成读取localStorage的role数据来鉴权
No branches or pull requests
在路由配置角色验证
加载菜单仍然会显示,经过筛查,发现 hasPermission方法权限验证通过了,由于 route.meta.pAuthorities 给了 * 的权限,现在想用角色来实现菜单权限控制有什么好的解决办法? 我目前想到的解决办法是在 routerUtil.js文件中在给pAuthorities 赋值时判断 authority 中是否存在 role 限制, 如果存在赋值 pAuthorities 下 permission 值为空字符串,目前测试可以实现预期效果,请问是否有其他方式解决这个问题
The text was updated successfully, but these errors were encountered: