Files

28 lines
823 B
YAML
Raw Permalink 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.
# Module Specaccess-controlACL + hasPermission + v-permissions
module:
id: access-control
name: 访问控制(角色/权限/指令)
type: core
entrypoints:
- src/store/modules/acl.ts
- src/utils/permission.ts
- library/plugins/directive.ts
public_api:
concept:
- "useAclStore 保存 admin/role/permission"
- "hasPermission(target) 统一判断路由/按钮权限"
- "v-permissions 指令在模板侧消费 hasPermission"
dependency_closure:
runtime:
- "Pinia store 初始化src/store/index.ts"
acceptance:
- "acl 中 admin=true 时 hasPermission 永远为 true"
- "指令 v-permissions 可用且不报错(具体隐藏/移除行为以实现为准)"
pitfalls:
- "权限数据来源通常由 user.getUserInfo() 写入 acl抽取时需明确数据流"