合并CRM
This commit is contained in:
@@ -40,4 +40,12 @@ export function isUrl(url) {
|
||||
const urlRegex = /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/;
|
||||
return urlRegex.test(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为空
|
||||
*/
|
||||
export function isEmpty(value) {
|
||||
if (value === null || value === undefined) return true
|
||||
if (typeof value === 'string') return value.trim() === ''
|
||||
if (Array.isArray(value)) return value.length === 0
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user