未验证 提交 ea604783 编写于 作者: D dyz 提交者: GitHub

perf[permission.js]: remove useless code (#3301)

上级 fe22b3cd
......@@ -13,11 +13,7 @@ export default function checkPermission(value) {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
if (!hasPermission) {
return false
}
return true
return hasPermission
} else {
console.error(`need roles! Like v-permission="['admin','editor']"`)
return false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册