123456789101112131415161718 |
- /**
- * 操作权限处理
- * 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)
- }
- }
- }
|