wms-elevue/src/plugins/directives.ts
2024-07-08 19:24:07 +08:00

15 lines
464 B
TypeScript

import { App } from 'vue';
import { perm,perms } from '@/directives/permission';
import { scrollBar } from '@/directives/scrollBar';
/**
* 注册全局自定义指令
* @param app
*/
export function setupDirectives(app: App) {
app.directive('perm', perm); // 权限控制指令 (是否包含其中某个权限)
app.directive('perms', perms); // 权限控制指令 (是否包含所有权限)
app.directive('scrollBar', scrollBar); // 滚动条
}