Skip to content

HYzihong/vue2-router-permissions

Repository files navigation

vue2-router-permissions

对于 vue 的权限

  • 路由权限
  • 组件级别的权限

简单的权限方案

对于后端可以给予的权限方案:

  • plan1(branch:plan1): 返回路由 name 的是否可访问的表,例如:{page1:true,page2:true,page3:false}
  • plan2(branch:plan2): 返回权限级别,比如:['admin','admin-delete','page1-all'],我们可以在路由表的 meta 中匹配角色
  • plan3(branch:plan3): 返回完整的路由表,例如:{[{path: "/",name: "Home",component: Home,},},不能返回绝对路径,要返回 Home

About

vue2 router permissions plan

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published