代码提交

This commit is contained in:
2023-03-23 14:05:29 +08:00
parent 24a29cff46
commit 5a93095845
2 changed files with 8 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
import store from '@/store'
export default {
inserted(el, binding, vnode) {
inserted(el, binding) {
const { value } = binding
const roles = store.getters && store.getters.roles
if (value && value instanceof Array && value.length > 0) {
@@ -15,7 +15,7 @@ export default {
el.parentNode && el.parentNode.removeChild(el)
}
} else {
// throw new Error(`使用方式: v-permission="['admin','editor']"`)
throw new Error(`使用方式: v-permission="['admin','editor']"`)
}
}
}