/** * 操作权限处理 * Copyright (c) 2019 ruoyi */ import store from '@/store' export default { inserted(el, binding, vnode) { const { value } = binding const func = store.getters && store.getters.hasPermissions const hasPermissions = func(value) if (!hasPermissions) { el.parentNode && el.parentNode.removeChild(el) } } }