@dazhicheng/utils 1.3.50 → 1.3.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/axios/loading.d.ts +14 -5
- package/dist/format.d.ts +101 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/tool.d.ts +5 -1
- package/package.json +4 -2
package/dist/tool.d.ts
CHANGED
|
@@ -91,11 +91,15 @@ export declare function triggerWindowResize(): void;
|
|
|
91
91
|
export declare function arrGive(targrt: any, sources: any, key?: any, content?: any): void;
|
|
92
92
|
/**
|
|
93
93
|
* 时间转换过滤器 依赖dayjs 默认UTC时间
|
|
94
|
+
*
|
|
95
|
+
* 空值(`null` / `undefined` / `""` / `0` / `"0"`)与无效时间一律返回空字符串,
|
|
96
|
+
* 因此签名接受空值:调用方拿到的接口字段大多是可选的,不必在每个调用点补非空断言。
|
|
94
97
|
* @param value key 时间戳接收毫秒
|
|
95
98
|
* @param format 格式化样式YYYY-MM-DD HH:mm:ss.SSS A (dayjs的format)
|
|
96
99
|
* @param tz 默认时区 Asia/Shanghai
|
|
100
|
+
* @returns 格式化后的时间字符串,空值或无效时间返回空字符串
|
|
97
101
|
*/
|
|
98
|
-
export declare const dateFormat: (value: string | number | Date, format?: string, tz?: string) => string;
|
|
102
|
+
export declare const dateFormat: (value: string | number | Date | null | undefined, format?: string, tz?: string) => string;
|
|
99
103
|
/**
|
|
100
104
|
* 深度克隆对象或数组 禁止循环引用对象
|
|
101
105
|
* @description 使用 klona 库进行深度克隆,支持所有类型的数据结构 https://www.npmjs.com/package/klona
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dazhicheng/utils",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.52",
|
|
4
4
|
"description": "工具库",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"type": "module",
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/crypto-js": "^4.2.2",
|
|
44
|
-
"@types/node": "^24.5.2"
|
|
44
|
+
"@types/node": "^24.5.2",
|
|
45
|
+
"@types/numeral": "^2.0.5"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
48
|
"clsx": "^2.1.1",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"decimal.js": "^10.4.3",
|
|
51
52
|
"defu": "^6.1.4",
|
|
52
53
|
"klona": "^2.0.6",
|
|
54
|
+
"numeral": "^2.0.6",
|
|
53
55
|
"tailwind-merge": "^3.5.0",
|
|
54
56
|
"@dazhicheng/openapi": "1.1.13"
|
|
55
57
|
},
|