mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 14:31:04 +00:00
improve: 鉴权判断取消
This commit is contained in:
parent
c6b814af07
commit
43e7a1f5a1
@ -19,15 +19,14 @@ export default {
|
||||
async install(Vue, options) {
|
||||
Vue.directive('auth', {
|
||||
inserted(el, binding, vnode) {
|
||||
const { value } = binding;
|
||||
const access = store.state.userInfo.access;
|
||||
|
||||
if (value && value instanceof Array && value.length && access && access.length) {
|
||||
const isPermission = includeArray(value, access);
|
||||
if (!isPermission) {
|
||||
el.parentNode && el.parentNode.removeChild(el);
|
||||
}
|
||||
}
|
||||
// const { value } = binding;
|
||||
// const access = store.state.userInfo.access;
|
||||
// if (value && value instanceof Array && value.length && access && access.length) {
|
||||
// const isPermission = includeArray(value, access);
|
||||
// if (!isPermission) {
|
||||
// el.parentNode && el.parentNode.removeChild(el);
|
||||
// }
|
||||
// }
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user