permission.js 296 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 import { hasPermission } from '@/utils/auth' export default { inserted(el, binding, vnode) { const { value } = binding // v-permission 绑定的权限值 var checkFlag = hasPermission(value) if(checkFlag == false && el.parentNode ){ el.parentNode.removeChild(el) } }, }