Files
ClassContent/历届学生/fontendseven/项目练习/上课项目/admin/笔记.txt
2024-09-27 02:06:13 +08:00

65 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

权限控制:
路由权限(路由配置文件)
页面显示和隐藏
1:用户登录成功后 接口 /login
{
token: '',
jurisdiction: [ // 权限数组
{
name: '用户管理',
path: 'user',
icon: '',
children: [
{
name: '添加用户',
path: 'add',
icon: '',
},
{
name: '编辑用户',
path: 'edit',
icon: '',
},
{
name: '用户列表',
path: 'list',
icon: '',
}
]
},
{
name: '文章管理',
path: 'article',
icon: '',
children: [
{
name: '添加文章',
path: 'add',
icon: '',
},
{
name: '编辑文章',
path: 'edit',
icon: '',
},
{
name: '文章列表',
path: 'list',
icon: '',
}
]
}
]
}
2: 根据 权限数组 遍历,生成路由的配置文件
根据 权限数组 遍历,生成 左侧的导航菜单