diff --git a/src/utils/permission.js b/src/utils/permission.js index 221d3842c288b6fe609b230e2ce65afea7d8b259..8e2bbadad0b3837edc2565b6cf5c323680855a6c 100644 --- a/src/utils/permission.js +++ b/src/utils/permission.js @@ -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