【新增】MALL: 满减送活动赠送优惠券(80%)

This commit is contained in:
puhui999
2024-08-23 16:22:46 +08:00
parent 10cb91ad59
commit a08684089d
5 changed files with 111 additions and 59 deletions

View File

@ -18,8 +18,8 @@ export const isObject = (val: any): val is Record<any, any> => {
return val !== null && is(val, 'Object')
}
export const isEmpty = <T = unknown>(val: T): val is T => {
if (val === null) {
export const isEmpty = (val: any): boolean => {
if (val === null || val === undefined || typeof val === 'undefined') {
return true
}
if (isArray(val) || isString(val)) {