Merge remote-tracking branch 'ruoyi/master'

# Conflicts:
#	README.md
#	ruoyi-ui/package.json
#	ruoyi-ui/src/utils/index.js
#	ruoyi-ui/src/views/index.vue
This commit is contained in:
tony
2023-12-12 16:16:57 +08:00
54 changed files with 1116 additions and 1129 deletions

View File

@@ -15,10 +15,8 @@ export function checkPermi(value) {
return all_permission === permission || permissionDatas.includes(permission)
})
if (!hasPermission) {
return false
}
return true
return hasPermission;
} else {
console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`)
return false
@@ -40,10 +38,8 @@ export function checkRole(value) {
return super_admin === role || permissionRoles.includes(role)
})
if (!hasRole) {
return false
}
return true
return hasRole;
} else {
console.error(`need roles! Like checkRole="['admin','editor']"`)
return false

View File

@@ -65,10 +65,7 @@ export function validEmail(email) {
* @returns {Boolean}
*/
export function isString(str) {
if (typeof str === 'string' || str instanceof String) {
return true
}
return false
return typeof str === 'string' || str instanceof String;
}
/**