Update permission.js

这里直接删除节点在分页渲染的时候会报错
pull/895/head
liujin0506 2018-07-20 16:04:46 +08:00 committed by GitHub
parent 8851a68066
commit bc7f4a3571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ export default{
})
if (!hasPermission) {
el.parentNode && el.parentNode.removeChild(el)
el.style.display = 'none'
}
} else {
throw new Error(`need roles! Like v-permission="['admin','editor']"`)