This commit is contained in:
吕金泽
2021-10-24 20:09:53 +08:00
commit 4a7d1d08ac
509 changed files with 142640 additions and 0 deletions
@@ -0,0 +1,17 @@
const hasPermission = {
install(Vue, options) {
Vue.directive('permission', {
bind(el, binding, vnode) {
if (binding.value) {
const permissionList = Vue.prototype.$authorities
if (permissionList && permissionList.length && !permissionList.includes(binding.value)) {
el.style.display = 'none'
}
}
}
})
}
}
export default hasPermission