仪表盘
版本库
文件存储
活动
搜索
登录
main
/
yuanwang-mes-uniapp
山东元旺PDA
概况
操作记录
提交次数
目录
文档
分支
对比
blame
|
历史
|
原始文档
fix: 完成菜单权限调整
spring
2025-12-11
755e7038caf74126eb4d696ef88f11f0871ff0ee
[yuanwang-mes-uniapp.git]
/
src
/
directive
/
index.ts
1
2
3
4
5
6
7
8
9
10
import type { App } from "vue";
import { hasPerm, hasRole } from "./permission";
// 全局注册 directive
export function setupDirective(app: App<Element>) {
// 使 v-hasPerm 在所有组件中都可用
app.directive("hasPerm", hasPerm);
app.directive("hasRole", hasRole);
}