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

17 lines
454 B
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:在登录的时候调用登录接口,这个接口会返回
token
jurisdiction 权限数组(菜单数组)
2:遍历权限数组,生成 左侧的导航菜单
3:遍历权限数组,生成 路由的配置文件,然后使用 vue-router 提供的 addRouter 方法,让我们刚生成的
路由配置文件生效