{
1. router.js
path: '/HelloWorld',
name: 'HelloWorld',
component: HelloWorld,
meta: {
requireAuth: true, roles: ['superadmin','admin','user']}
},
{
path: '/SuperAdmin',
name: 'SuperAdmin',
component: SuperAdmin,
meta: {
requireAuth: true, roles: ['superadmin']}},
{
path: '/Admin',
name: 'Admin',
component: Admin,
meta: {
requireAuth
vue-router.beforeEach不同角色登录到不同页面
最新推荐文章于 2024-04-16 17:28:45 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)