fix: 把 Yi.Vben5.Vue3 下的 packages 目录放出来

This commit is contained in:
dubai
2026-01-04 14:10:05 +08:00
committed by wcg
parent 51ee3fb460
commit 176af22572
793 changed files with 52888 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
/**
* 跟后台逻辑一致
* Number.isSafeInteger形参只能为Number类型 其他的直接返回false
* @param str 数字
* @returns 安全数内返回number类型 否则返回原字符串
*/
export function safeParseNumber(str: string): number | string {
const num = Number(str);
return Number.isSafeInteger(num) ? num : str;
}