This commit is contained in:
2025-06-25 12:27:52 +08:00
commit 960c4b7da4
190 changed files with 38050 additions and 0 deletions

10
src/directive/index.ts Normal file
View File

@ -0,0 +1,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);
}