mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-26 02:57:16 +08:00
chore(system/storage): 完善存储管理权限指令
This commit is contained in:
@@ -4,7 +4,7 @@ import hasRole from './permission/hasRole'
|
||||
|
||||
export default {
|
||||
install(Vue: App) {
|
||||
Vue.directive('hasPerm', hasPerm)
|
||||
Vue.directive('hasRole', hasRole)
|
||||
Vue.directive('permission', hasPerm)
|
||||
Vue.directive('role', hasRole)
|
||||
}
|
||||
}
|
||||
|
@@ -2,8 +2,8 @@ import type { DirectiveBinding, Directive } from 'vue'
|
||||
import { useUserStore } from '@/stores'
|
||||
|
||||
/**
|
||||
* @desc v-hasPerm 操作权限处理
|
||||
* @desc 使用 v-hasPerm="['home:btn:add']"
|
||||
* @desc v-permission 操作权限处理
|
||||
* @desc 使用 v-permission="['system:user:add']"
|
||||
*/
|
||||
function checkPermission(el: HTMLElement, binding: DirectiveBinding) {
|
||||
const userStore = useUserStore()
|
||||
|
Reference in New Issue
Block a user