feat: 初始化

This commit is contained in:
George
2025-07-07 15:55:44 +08:00
commit 9b7bfcfe5a
969 changed files with 123036 additions and 0 deletions

View File

@ -0,0 +1,23 @@
// @ts-nocheck
/**
* 检查一个值是否已定义(不为 undefined且不为 null
* @param value 要检查的值
* @returns 如果值已定义且不为 null则返回 true否则返回 false
*/
// #ifndef UNI-APP-X
export function isDef(value: unknown): boolean {
return value !== undefined && value !== null;
}
// #endif
// #ifdef UNI-APP-X
export function isDef(value : any|null) : boolean {
// #ifdef APP-ANDROID || APP-IOS
return value != null;
// #endif
// #ifndef APP-ANDROID || APP-IOS
return value != null && value != undefined;
// #endif
}
// #endif