空字符串判断

This commit is contained in:
xiaoxiao 2025-07-11 17:18:49 +08:00
parent 4df444ed0e
commit 2da6409a0b

View File

@ -188,5 +188,13 @@ export class ChangeUtil {
const g = parseInt(hex.slice(3, 5), 16); const g = parseInt(hex.slice(3, 5), 16);
const b = parseInt(hex.slice(5, 7), 16); const b = parseInt(hex.slice(5, 7), 16);
return `rgba(${r}, ${g}, ${b}, ${alpha})`; return `rgba(${r}, ${g}, ${b}, ${alpha})`;
}; }
static stringIsUndefinedAndNull (string:string | undefined):boolean {
if (string == undefined || string == "null" || string == "<null>" || string == "(null)" || string == 'undefined' || string.length <= 0) {
return true
} else {
return false
}
}
} }