feat: 新增按钮级权限指令 v-permission 与 Axios 全局防重复提交机制

This commit is contained in:
DXC
2026-03-10 11:59:41 +08:00
parent 3ab47ab2fb
commit 525acae423
4 changed files with 105 additions and 6 deletions

View File

@ -17,6 +17,9 @@ import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 4. 引入全局样式 (通常建议加上,如果没有可忽略)
import './style.css'
// 5. 引入全局自定义指令
import permissionDirective from './directives/permission'
const app = createApp(App)
// =========================================================
@ -41,4 +44,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component)
}
// 5. 注册全局自定义指令
app.directive('permission', permissionDirective)
app.mount('#app')