From 2da6409a0bd7ae8bdcd4818768016b048f4d806d Mon Sep 17 00:00:00 2001 From: xiaoxiao Date: Fri, 11 Jul 2025 17:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/basic/src/main/ets/utils/ChangeUtil.ets | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/commons/basic/src/main/ets/utils/ChangeUtil.ets b/commons/basic/src/main/ets/utils/ChangeUtil.ets index b87e1d4..0781c04 100644 --- a/commons/basic/src/main/ets/utils/ChangeUtil.ets +++ b/commons/basic/src/main/ets/utils/ChangeUtil.ets @@ -188,5 +188,13 @@ export class ChangeUtil { const g = parseInt(hex.slice(3, 5), 16); const b = parseInt(hex.slice(5, 7), 16); return `rgba(${r}, ${g}, ${b}, ${alpha})`; - }; + } + + static stringIsUndefinedAndNull (string:string | undefined):boolean { + if (string == undefined || string == "null" || string == "" || string == "(null)" || string == 'undefined' || string.length <= 0) { + return true + } else { + return false + } + } } \ No newline at end of file