mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-08-16 00:00:34 +08:00
升级ui vue3版本
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
|
||||
const hasPermission = {
|
||||
install(app) {
|
||||
app.directive('permission', {
|
||||
beforeMount(el, binding) {
|
||||
if (binding.value) {
|
||||
const permissionList = app.config.globalProperties.$global.user.authorities
|
||||
if (permissionList && permissionList.length && !permissionList.includes(binding.value) && import.meta.env.NODE_ENV != 'preview') {
|
||||
el.style.display = 'none'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default hasPermission
|
||||
Reference in New Issue
Block a user