From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目

---
 src/directives/index.ts |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/src/directives/index.ts b/src/directives/index.ts
new file mode 100644
index 0000000..1b99988
--- /dev/null
+++ b/src/directives/index.ts
@@ -0,0 +1,24 @@
+import type { App } from 'vue'
+import { hasRole } from './permission/hasRole'
+import { hasPermi } from './permission/hasPermi'
+
+/**
+ * 瀵煎嚭鎸囦护锛歷-xxx
+ * @methods hasRole 鐢ㄦ埛鏉冮檺锛岀敤娉�: v-hasRole
+ * @methods hasPermi 鎸夐挳鏉冮檺锛岀敤娉�: v-hasPermi
+ */
+export const setupAuth = (app: App<Element>) => {
+  hasRole(app)
+  hasPermi(app)
+}
+
+/**
+ * 瀵煎嚭鎸囦护锛歷-mountedFocus
+ */
+export const setupMountedFocus = (app: App<Element>) => {
+  app.directive('mountedFocus', {
+    mounted(el) {
+      el.focus()
+    }
+  })
+}

--
Gitblit v1.8.0