lyb-js 1.6.16 → 1.6.18

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @description 数字每三位添加逗号
2
+ * @description 数字每三位添加逗号(不四舍五入)
3
3
  * @param num 需要格式化的数字
4
4
  * @param reserve 保留小数位数
5
5
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNumComma-数字逗号
@@ -1,11 +1,14 @@
1
+ import Decimal from "decimal.js";
1
2
  /**
2
- * @description 数字每三位添加逗号
3
+ * @description 数字每三位添加逗号(不四舍五入)
3
4
  * @param num 需要格式化的数字
4
5
  * @param reserve 保留小数位数
5
6
  * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNumComma-数字逗号
6
7
  */
7
8
  export const libJsNumComma = (num, reserve = 2) => {
8
- const str = num.toFixed(reserve).toString();
9
- const reg = str.indexOf(".") > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g;
9
+ const decimal = new Decimal(num);
10
+ // 截断小数,不四舍五入
11
+ const str = decimal.toFixed(reserve, Decimal.ROUND_DOWN);
12
+ const reg = str.includes(".") ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g;
10
13
  return str.replace(reg, "$1,");
11
14
  };
@@ -48,4 +48,6 @@ export declare class LibJsClassObservable<T extends Record<string, any>> {
48
48
  * @param immediately 是否立即通知监听器
49
49
  */
50
50
  setBooleanValue<K extends keyof T>(key: K, immediately?: boolean): boolean;
51
+ /** @description 清空所有监听 */
52
+ clear(): void;
51
53
  }
@@ -90,4 +90,8 @@ export class LibJsClassObservable {
90
90
  this.setValue(key, v, immediately);
91
91
  return v;
92
92
  }
93
+ /** @description 清空所有监听 */
94
+ clear() {
95
+ this.listeners.clear();
96
+ }
93
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lyb-js",
3
- "version": "1.6.16",
3
+ "version": "1.6.18",
4
4
  "description": "自用JS方法库",
5
5
  "license": "ISC",
6
6
  "type": "module",
@@ -1,25 +0,0 @@
1
- type Callback<T> = (newValue: T[keyof T], oldValue: T[keyof T]) => void;
2
- export declare class LibJsObserver<Store> {
3
- /** 递增索引 */
4
- private _index;
5
- private _store;
6
- private _lastData;
7
- private _listeners;
8
- constructor(store: Store);
9
- /** @description 监听
10
- * @param key 要监听的键
11
- * @param callback key值变化时执行的回调函数
12
- * @param immediately 监听时是否立即执行回调函数
13
- * @returns 返回一个函数用于注销监听器
14
- */
15
- on(key: keyof Store, callback: Callback<Store>, immediately?: boolean): () => void;
16
- /** @description 获取数据 */
17
- getData(key: keyof Store): Store[keyof Store];
18
- /** @description 手动更新数据 */
19
- setData(newData: Partial<Store>): void;
20
- /** @description 通知监听器更新 */
21
- private _notifyListeners;
22
- /** @description 判断数据变化并通知监听器 */
23
- private _update;
24
- }
25
- export {};
@@ -1,100 +0,0 @@
1
- export class LibJsObserver {
2
- constructor(store) {
3
- /** 递增索引 */
4
- this._index = 0;
5
- // 监听器映射,用于存储不同键的回调函数
6
- this._listeners = new Map();
7
- this._store = store;
8
- this._lastData = Object.assign({}, store);
9
- }
10
- /** @description 监听
11
- * @param key 要监听的键
12
- * @param callback key值变化时执行的回调函数
13
- * @param immediately 监听时是否立即执行回调函数
14
- * @returns 返回一个函数用于注销监听器
15
- */
16
- on(key, callback, immediately = true) {
17
- this._index += 1;
18
- const index = this._index;
19
- // 如果该键没有对应的监听器集合,则初始化一个新的集合
20
- if (!this._listeners.has(key)) {
21
- this._listeners.set(key, new Map());
22
- }
23
- // 将回调函数添加到对应键的监听器集合中
24
- this._listeners.get(key).set(index, callback);
25
- immediately && callback(this._store[key], this._lastData[key]);
26
- return () => {
27
- // 从特定键的监听器集合中移除指定标识符的回调函数
28
- const listenerMap = this._listeners.get(key);
29
- if (listenerMap) {
30
- listenerMap.delete(index);
31
- }
32
- else {
33
- console.warn(`监听 Key "${key.toString()}" 重复注销事件`);
34
- }
35
- };
36
- }
37
- /** @description 获取数据 */
38
- getData(key) {
39
- return this._store[key];
40
- }
41
- /** @description 手动更新数据 */
42
- setData(newData) {
43
- this._store = Object.assign(Object.assign({}, this._store), newData);
44
- this._update();
45
- }
46
- /** @description 通知监听器更新 */
47
- _notifyListeners(key, newValue, oldValue) {
48
- // 获取特定键的所有监听器
49
- const keyListeners = this._listeners.get(key);
50
- if (keyListeners) {
51
- // 遍历并执行每个监听器的回调函数
52
- keyListeners.forEach((callback) => callback(newValue, oldValue));
53
- }
54
- }
55
- /** @description 判断数据变化并通知监听器 */
56
- _update() {
57
- // 遍历当前数据对象的每个键,检查是否有变化
58
- for (const key in this._store) {
59
- const typedKey = key;
60
- const newValue = this._store[typedKey];
61
- const oldValue = this._lastData[typedKey];
62
- //如果旧值与新值不相等,则通知监听器
63
- if (newValue !== oldValue) {
64
- this._notifyListeners(typedKey, newValue, oldValue);
65
- this._lastData[typedKey] = this._store[typedKey];
66
- }
67
- }
68
- }
69
- }
70
- class LibJsStore extends LibJsObserver {
71
- constructor() {
72
- super({
73
- name: "张三",
74
- age: 20,
75
- });
76
- }
77
- }
78
- const store = new LibJsStore();
79
- const offA = store.on("age", (newValue) => {
80
- console.log(`A收到年龄更新:`, newValue);
81
- });
82
- store.on("age", (newValue) => {
83
- console.log(`B收到年龄更新:`, newValue);
84
- });
85
- // 模拟更新数据
86
- setTimeout(() => {
87
- console.log("尝试更新年龄值为:25");
88
- store.setData({ age: 25 });
89
- setTimeout(() => {
90
- console.warn("注销A监听器");
91
- offA();
92
- setTimeout(() => {
93
- console.warn("尝试更新年龄值为:26");
94
- store.setData({ age: 26 });
95
- setTimeout(() => {
96
- console.log("尝试获取年龄值:", store.getData("age"));
97
- }, 1000);
98
- }, 1000);
99
- }, 1000);
100
- }, 1000);
package/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * as LibJs from "./libJs";
package/index.js DELETED
@@ -1 +0,0 @@
1
- export * as LibJs from "./libJs";
package/libJs.d.ts DELETED
@@ -1,348 +0,0 @@
1
- import { LibJsNumberStepper } from "./Misc/LibJsNumberStepper";
2
- import { LibJsClassObservable } from "./Misc/LibJsClassObservable";
3
- import { LibJsResizeWatcher } from "./Base/LibJsResizeWatcher";
4
- import { LibJsPullUpLoad } from "./Misc/LibJsPullUpLoad";
5
- /** @description 基础方法 */
6
- export declare const Base: {
7
- /**
8
- * @description 返回数据类型
9
- * @param v 需要判断类型的数据
10
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsColorConsole-有色打印
11
- */
12
- libJsGetDataType: (v: any) => import("./Base/LibJsGetDataType").LibJsGetDataTypeReturnType;
13
- /**
14
- * @description 延时执行,切换到其他页面会暂停
15
- * @param delay 延时毫秒数
16
- * @param fn 延时执行函数
17
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsPromiseTimeout-延时执行
18
- */
19
- libJsPromiseTimeout: (delay?: number, fn?: () => void) => Promise<void>;
20
- /** @description 监听窗口变化,内部只注册一次resize事件,调用监听自身可取消监听 */
21
- LibJsResizeWatcher: typeof LibJsResizeWatcher;
22
- };
23
- /** @description 浏览器相关方法 */
24
- export declare const Browser: {
25
- /** @description console颜色打印
26
- * @param title 标题
27
- * @param color 颜色
28
- * @param logs 信息
29
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsColorConsole-有色打印
30
- */
31
- libJsColorConsole: (title: string, color: "red" | "orange" | "yellow" | "green" | "blue" | "purple", logs?: {
32
- label: string;
33
- value: any;
34
- }[] | any) => void;
35
- /** @description 判断是否为移动设备
36
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsIsMobile-判断手机
37
- */
38
- libJsIsMobile: () => boolean;
39
- /** @description 判断是否为平板
40
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsIsPad-判断平板
41
- */
42
- libJsIsPad: () => boolean;
43
- /** @description 获取浏览器地址栏参数
44
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsPathParams-地址栏参数
45
- */
46
- libJsPathParams: (path?: string) => Record<string, string>;
47
- /** @description 动态设置网站标题及图标
48
- * @param title 网站标题
49
- * @param url 网站图标地址
50
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSetTitleIcon-网站标题图标
51
- */
52
- libJsSetTitleIcon: (title: string, url: string) => void;
53
- /** @description 网站标题交互,当从当前网页切换到其他网页,网站标题自动切换
54
- * @param backTitle 从其他网页返回时显示的标题
55
- * @param leaveTitle 从当前网页离开时显示的标题
56
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsTagTitleTip-网站标题交互
57
- */
58
- libJsTagTitleTip: (backTitle: string, leaveTitle: string) => void;
59
- /** @description 对象转为url参数
60
- * @param params 对象参数
61
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsObjToUrlParams-对象转Url参数
62
- */
63
- libJsObjToUrlParams: (params: Record<string, string | number | boolean>) => string;
64
- /** @description 复制文本到剪贴板
65
- * @param text 要复制的文本
66
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#libJsCopy-复制文本到剪贴板
67
- */
68
- libJsCopy: (text: string) => void;
69
- };
70
- /** @description 数据相关方法 */
71
- export declare const Data: {
72
- /**
73
- * @description 将数组拆分成指定数组元素数量的多个数组
74
- * @param arr 需要拆分的数组
75
- * @param chunkSize 每个数组的元素数量
76
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsChunkArray-数组拆分
77
- */
78
- libJsChunkArray: <T>(arr: T[], chunkSize: number) => T[][];
79
- /** @description 递归将JSON字符串深度解析为对象
80
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsDeepJSONParse-深度解析JSON
81
- */
82
- libJsDeepJSONParse: (data: any) => any;
83
- /**
84
- * @description 分类汇总,将数组对象按照指定键值整理成一个以键值为键名的对象
85
- * @param arr 要分组的数组
86
- * @param key 分组的键
87
- * @returns 分组后的对象
88
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsGroupArrayByKey-分类汇总
89
- */
90
- libJsGroupArrayByKey: (arr: any[] | undefined, key: string) => any;
91
- /**
92
- * @description 匹配电子邮件,可用于实时输入时,自动补全常用邮箱后缀
93
- * @param str 要匹配的字符串
94
- * @param emailList 电子邮件后缀列表
95
- * @returns 匹配结果数组
96
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsMatchEmail-匹配E-Mail
97
- */
98
- libJsMatchEmail: (str: string, emailList: string[]) => string[];
99
- /** @description 数组乱序
100
- * @param arr 需要乱序的数组
101
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsShuffleArray-数组乱序
102
- */
103
- libJsShuffleArray: <T>(arr: T[]) => T[];
104
- /** @description 数组元素整体步数移动
105
- * @param arr 移动的数组
106
- * @param step 负数为向后移动,正数为向前移动
107
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsStepArray-数组偏移
108
- */
109
- libJsStepArray: <T>(arr: T[], step: number) => T[];
110
- /** @description 翻转指定索引后面的数组
111
- * @param arr 数组
112
- * @param index 开始索引
113
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibReverseArrayFromIndex-数组定位翻转
114
- */
115
- libReverseArrayFromIndex: <T>(arr: T[], index: number) => T[];
116
- /** @description 随机选择未使用元素 */
117
- libJsPickUnique: <T>(pool: T[], used?: T[]) => T | undefined;
118
- };
119
- /** @description 文件相关方法 */
120
- export declare const File: {
121
- /** @description 下载图片链接
122
- * @param link 图片链接
123
- * @param name 图片名称
124
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsDownloadImageLink-图片下载
125
- */
126
- libJsDownloadImageLink: (link: string, name: string) => void;
127
- /** @description 图片压缩
128
- * @param obj 压缩参数
129
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsImageOptimizer-图片压缩
130
- */
131
- libJsImageOptimizer: (obj: import("./File/LibJsImageOptimizer").LibJsImageOptimizerOptionsParams) => void;
132
- /**
133
- * @description 保存文件到本地
134
- * @param data 要保存的数据
135
- * @param name 文件名
136
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSaveJson-保存文件
137
- */
138
- libJsSaveJson: (name: string, data: BlobPart) => void;
139
- };
140
- /** @description 格式化相关方法 */
141
- export declare const Formatter: {
142
- /**
143
- * @description 格式化字节大小
144
- * @param bytes 字节数
145
- * @returns ['大小', '单位', '大小及单位']
146
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsFormatterByte-字节格式化
147
- */
148
- libJsFormatterByte: (bytes: number) => (string | number)[];
149
- /**
150
- * @description 隐藏手机号码中间的四位数字
151
- * @param mobile 需要处理的手机号码
152
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsMaskPhoneNumber-隐藏手机号码
153
- */
154
- libJsMaskPhoneNumber: (mobile: number | string) => string;
155
- /**
156
- * @description 数字每三位添加逗号
157
- * @param num 需要格式化的数字
158
- * @param reserve 保留小数位数
159
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNumComma-数字逗号
160
- */
161
- libJsNumComma: (num: number, reserve?: number) => string;
162
- /** @description 将大于1000的数字使用k为单位
163
- * @param num 数字
164
- * @param units 单位组,key为单位,value为格式化阈值
165
- * @returns [数字, 单位]
166
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNumberUnit-数字单位
167
- */
168
- libJsNumberUnit: (num: number, units: Record<string, number>, retain?: number) => string;
169
- /**
170
- * @description 将秒数格式化为中文时间描述,支持扩展到年和月
171
- * @param seconds 秒数
172
- * @returns 格式化后的中文时间
173
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSecondsFormatterChinese-中文时间
174
- */
175
- libJsSecondsFormatterChinese: (seconds: number) => string;
176
- };
177
- /** @description 数学相关方法 */
178
- export declare const Math: {
179
- /** @description 计算表达式字符串
180
- * @param expression 表达式字符串
181
- * @param point 小数点精度
182
- * @returns 计算结果
183
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsCalculateExpression-表达式字符串
184
- */
185
- libJsCalculateExpression: (expression: string, point?: number) => number;
186
- /**
187
- * @description 角度和弧度互相转换
188
- * @param value 角度值或弧度值
189
- * @param type 角度类型或弧度类型
190
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsConvertAngle-角弧度互转
191
- */
192
- libJsConvertAngle: (value: number, type: "rad" | "deg") => number;
193
- /** @description 计算两点角度
194
- * @param coord1 起点坐标
195
- * @param coord2 终点坐标
196
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsCoordsAngle-两点角度
197
- */
198
- libJsCoordsAngle: (coord1: {
199
- x: number;
200
- y: number;
201
- }, coord2: {
202
- x: number;
203
- y: number;
204
- }, mode?: "deg" | "rad") => number;
205
- /** @description 计算两点距离
206
- * @param coord1 起点坐标
207
- * @param coord2 终点坐标
208
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsCoordsDistance-两点距离
209
- */
210
- libJsCoordsDistance: (coord1: {
211
- x: number;
212
- y: number;
213
- }, coord2: {
214
- x: number;
215
- y: number;
216
- }) => number;
217
- /** @description 计算两个数的运算结果,并保留指定位数的小数
218
- * @param num1 第一个数
219
- * @param num2 第二个数
220
- * @param operator 运算符,支持加减乘除
221
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsDecimal-高精度计算
222
- */
223
- libJsDecimal: (num1: number, num2: number, operator: "+" | "-" | "*" | "/", point?: number) => number;
224
- };
225
- /** @description 杂项相关方法 */
226
- export declare const Misc: {
227
- /**
228
- * @description 表单验证函数
229
- * @param form 表单数据对象
230
- * @param rules 验证规则数组
231
- * @returns 验证结果数组,包含未通过验证的项
232
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRegFormValidate-表单验证
233
- */
234
- libJsRegFormValidate: (form: Record<string, any>, rules: Array<{
235
- key: string;
236
- verify: RegExp | ((value: any) => boolean);
237
- msg: string;
238
- name: string;
239
- }>) => import("./Misc/LibJsRegFormValidate").ValidationResult[];
240
- /** @description 请求失败重连
241
- * @param promiseFn 请求函数
242
- * @param maxRetries 最大重试次数
243
- * @param retryDelay 重试间隔时间
244
- * @param params 请求参数
245
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRetryRequest-请求重连
246
- */
247
- libJsRetryRequest: <T>({ promiseFn, maxRetries, retryDelay, params, }: {
248
- promiseFn: (params?: any) => Promise<T>;
249
- params?: any;
250
- maxRetries?: number;
251
- retryDelay?: number;
252
- onRetry?: () => void;
253
- }) => Promise<T>;
254
- /** @description 数字步进器
255
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNumberStepper-数字步进器
256
- */
257
- LibJsNumberStepper: typeof LibJsNumberStepper;
258
- /** @description 线性插值
259
- * @param start 当 value = 0 时,返回 start
260
- * @param end 当 value = 1 时,返回 end
261
- * @param value 插值比例,取值范围 0~1
262
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsLerp-线性插值
263
- */
264
- LibJsLerp: (start: number, end: number, value: number) => number;
265
- /** @description 值介于起点与终点之间时返回一个介于0与1之间的数
266
- * @param start 起点
267
- * @param end 终点
268
- * @param value 动态值
269
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsNormalizeInRange-范围归一化
270
- */
271
- LibJsNormalizeInRange: (start: number, end: number, value: number) => number;
272
- /** @description 事件发射器
273
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsEmitter-事件发射器
274
- */
275
- LibJsEmitter: <T extends Record<string, any>>() => {
276
- on: <K extends keyof T>(event: K, listener: T[K] extends any[] ? (...args: T[K]) => void : (arg: T[K]) => void) => void;
277
- emit: <K extends keyof T>(event: K, ...args: T[K] extends any[] ? T[K] : [T[K]]) => void;
278
- off: <K extends keyof T>(event: K, listener?: T[K] extends any[] ? (...args: T[K]) => void : (arg: T[K]) => void) => void;
279
- clear: () => void;
280
- };
281
- /** @description 类属性监听器
282
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsClassObservable-类属性监听器
283
- */
284
- LibJsClassObservable: typeof LibJsClassObservable;
285
- /** @description 上拉加载 */
286
- LibJsPullUpLoad: typeof LibJsPullUpLoad;
287
- };
288
- /** @description 随机相关方法 */
289
- export declare const Random: {
290
- /** @description 百分比概率结果
291
- * @param probability 触发概率,百分比,0-100
292
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsProbabilityResult-概率触发
293
- */
294
- libJsProbabilityResult: (probability: number) => boolean;
295
- /** @description 随机数
296
- * @param min 最小值
297
- * @param max 最大值
298
- * @param num 保留小数位数
299
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRandom-随机数
300
- */
301
- libJsRandom: (min: number, max: number, num?: number) => number;
302
- /** @description 随机 RGBA 颜色
303
- * @param alpha 透明度
304
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsRandomColor-随机色
305
- */
306
- libJsRandomColor: (alpha?: number) => string;
307
- /** @description 随机生成n个指定范围的随机数数组
308
- * @param min 最小值
309
- * @param max 最大值
310
- * @param count 数组长度
311
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsUniqueRandomNumbers-随机数数组
312
- */
313
- libJsUniqueRandomNumbers: (min: number, max: number, count: number) => number[];
314
- };
315
- /** @description 时间相关方法 */
316
- export declare const Time: {
317
- /**
318
- * @description 传入时间戳与当前时间判断是否为同一天或同一周
319
- * @param timestamp 毫秒时间戳
320
- * @param unit 判断单位
321
- * @returns 0-同一单位时间 1-新单位时间 -1时间戳大于当前时间
322
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsSameTimeCheck-时间比对
323
- */
324
- libJsSameTimeCheck: (timestamp: number, unit: import("dayjs").OpUnitType) => 1 | -1 | 0;
325
- /** @description 时间差计算
326
- * @param timestamp 毫秒时间戳
327
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsTimeAgo-中文时间差
328
- */
329
- libJsTimeAgo: (timestamp: number) => string;
330
- /**
331
- * @description 根据当前时间返回问候语
332
- * @param greet 自定义问候语对象
333
- * @link 使用方法:https://www.npmjs.com/package/lyb-js#LibJsTimeGreeting-时间问候
334
- */
335
- libJsTimeGreeting: (greet?: import("./Time/LibJsTimeGreeting").LibTimeGreetingParams) => string;
336
- /** @description 倒计时
337
- * @param endTime 毫秒时间戳
338
- */
339
- libJsCountdown: (endTime: number) => {
340
- years: string;
341
- months: string;
342
- days: string;
343
- hours: string;
344
- minutes: string;
345
- seconds: string;
346
- ended: boolean;
347
- };
348
- };