初始化拉取,原文件名:admin-plus-webpack5
Some checks failed
Call HTTPS API / build (push) Has been cancelled

This commit is contained in:
2025-12-26 20:43:10 +08:00
parent 7c68ec3a42
commit 3e2da1115e
420 changed files with 75413 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
import type { App, DirectiveBinding } from 'vue'
import { hasPermission } from '@/utils/permission'
export default {
install(app: App<Element>) {
/**
* @description 自定义指令v-permissions
*/
app.directive('permissions', {
mounted(el: any, binding: DirectiveBinding) {
const { value } = binding
if (value)
if (!hasPermission(value))
el.parentNode && el.parentNode.removeChild(el)
},
})
},
}