@utogether/utils 3.0.0-beta.4 → 3.0.0-beta.6
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/pkg/cookie.d.ts +3 -3
- package/dist/pkg/formatData.d.ts +1 -1
- package/dist/pkg/http/index.d.ts +2 -3
- package/dist/pkg/lunarCalendar.d.ts +14 -127
- package/dist/pkg/progress.d.ts +0 -1
- package/dist/pkg/useAttrs.d.ts +0 -1
- package/dist/pkg/useRender.d.ts +3 -3
- package/dist/pkg/useTree.d.ts +3 -3
- package/dist/pkg/useWatermark.d.ts +0 -1
- package/dist/utils.es.js +1158 -18373
- package/dist/utils.umd.js +1 -5
- package/package.json +1 -1
package/dist/pkg/cookie.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare class Cookies {
|
|
2
2
|
constructor();
|
|
3
|
-
prefix:
|
|
3
|
+
prefix: any;
|
|
4
4
|
/**
|
|
5
5
|
* 存储 cookie 值
|
|
6
6
|
* @param name
|
|
@@ -13,12 +13,12 @@ declare class Cookies {
|
|
|
13
13
|
* @param name
|
|
14
14
|
* @returns
|
|
15
15
|
*/
|
|
16
|
-
get(name?: string): string
|
|
16
|
+
get(name?: string): string;
|
|
17
17
|
/**
|
|
18
18
|
* 拿到 cookie 全部的值
|
|
19
19
|
* @returns
|
|
20
20
|
*/
|
|
21
|
-
getAll(): string
|
|
21
|
+
getAll(): string;
|
|
22
22
|
/**
|
|
23
23
|
* 删除 cookie
|
|
24
24
|
* @param name
|
package/dist/pkg/formatData.d.ts
CHANGED
package/dist/pkg/http/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { RequestMethods, SuHttpRequestConfig } from './types.d';
|
|
3
|
-
|
|
4
3
|
declare class SuHttp {
|
|
5
4
|
constructor();
|
|
6
|
-
router:
|
|
7
|
-
baseUrl:
|
|
5
|
+
router: any;
|
|
6
|
+
baseUrl: any;
|
|
8
7
|
/** token过期后,暂存待执行的请求 */
|
|
9
8
|
private static requests;
|
|
10
9
|
/** 防止重复刷新token */
|
|
@@ -131,100 +131,11 @@ export declare const lunarCalendar: {
|
|
|
131
131
|
/**
|
|
132
132
|
* 返回默认定义的阳历节日
|
|
133
133
|
*/
|
|
134
|
-
getFestival():
|
|
135
|
-
"1-1": {
|
|
136
|
-
title: string;
|
|
137
|
-
};
|
|
138
|
-
"2-14": {
|
|
139
|
-
title: string;
|
|
140
|
-
};
|
|
141
|
-
"5-1": {
|
|
142
|
-
title: string;
|
|
143
|
-
};
|
|
144
|
-
"5-4": {
|
|
145
|
-
title: string;
|
|
146
|
-
};
|
|
147
|
-
"6-1": {
|
|
148
|
-
title: string;
|
|
149
|
-
};
|
|
150
|
-
"9-10": {
|
|
151
|
-
title: string;
|
|
152
|
-
};
|
|
153
|
-
"10-1": {
|
|
154
|
-
title: string;
|
|
155
|
-
};
|
|
156
|
-
"12-25": {
|
|
157
|
-
title: string;
|
|
158
|
-
};
|
|
159
|
-
"3-8": {
|
|
160
|
-
title: string;
|
|
161
|
-
};
|
|
162
|
-
"3-12": {
|
|
163
|
-
title: string;
|
|
164
|
-
};
|
|
165
|
-
"4-1": {
|
|
166
|
-
title: string;
|
|
167
|
-
};
|
|
168
|
-
"5-12": {
|
|
169
|
-
title: string;
|
|
170
|
-
};
|
|
171
|
-
"7-1": {
|
|
172
|
-
title: string;
|
|
173
|
-
};
|
|
174
|
-
"8-1": {
|
|
175
|
-
title: string;
|
|
176
|
-
};
|
|
177
|
-
"12-24": {
|
|
178
|
-
title: string;
|
|
179
|
-
};
|
|
180
|
-
};
|
|
134
|
+
getFestival(): any;
|
|
181
135
|
/**
|
|
182
136
|
* 返回默认定义的内容里节日
|
|
183
137
|
*/
|
|
184
|
-
getLunarFestival():
|
|
185
|
-
"12-30": {
|
|
186
|
-
title: string;
|
|
187
|
-
};
|
|
188
|
-
"1-1": {
|
|
189
|
-
title: string;
|
|
190
|
-
};
|
|
191
|
-
"1-15": {
|
|
192
|
-
title: string;
|
|
193
|
-
};
|
|
194
|
-
"2-2": {
|
|
195
|
-
title: string;
|
|
196
|
-
};
|
|
197
|
-
"5-5": {
|
|
198
|
-
title: string;
|
|
199
|
-
};
|
|
200
|
-
"7-7": {
|
|
201
|
-
title: string;
|
|
202
|
-
};
|
|
203
|
-
"7-15": {
|
|
204
|
-
title: string;
|
|
205
|
-
};
|
|
206
|
-
"8-15": {
|
|
207
|
-
title: string;
|
|
208
|
-
};
|
|
209
|
-
"9-9": {
|
|
210
|
-
title: string;
|
|
211
|
-
};
|
|
212
|
-
"10-1": {
|
|
213
|
-
title: string;
|
|
214
|
-
};
|
|
215
|
-
"10-15": {
|
|
216
|
-
title: string;
|
|
217
|
-
};
|
|
218
|
-
"12-8": {
|
|
219
|
-
title: string;
|
|
220
|
-
};
|
|
221
|
-
"12-23": {
|
|
222
|
-
title: string;
|
|
223
|
-
};
|
|
224
|
-
"12-24": {
|
|
225
|
-
title: string;
|
|
226
|
-
};
|
|
227
|
-
};
|
|
138
|
+
getLunarFestival(): any;
|
|
228
139
|
/**
|
|
229
140
|
*
|
|
230
141
|
* @param param {Object} 按照festival的格式输入数据,设置阳历节日
|
|
@@ -275,7 +186,7 @@ export declare const lunarCalendar: {
|
|
|
275
186
|
* @return Number
|
|
276
187
|
* @eg:var count = calendar.lYearDays(1987) ;//count=387
|
|
277
188
|
*/
|
|
278
|
-
lYearDays: (y: any) =>
|
|
189
|
+
lYearDays: (y: any) => any;
|
|
279
190
|
/**
|
|
280
191
|
* 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
|
|
281
192
|
* @param y lunar Year
|
|
@@ -305,13 +216,13 @@ export declare const lunarCalendar: {
|
|
|
305
216
|
* @return Number (-1、28、29、30、31)
|
|
306
217
|
* @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
|
|
307
218
|
*/
|
|
308
|
-
solarDays: (y: any, m: any) =>
|
|
219
|
+
solarDays: (y: any, m: any) => any;
|
|
309
220
|
/**
|
|
310
221
|
* 农历年份转换为干支纪年
|
|
311
222
|
* @param lYear 农历年的年份数
|
|
312
223
|
* @return Cn string
|
|
313
224
|
*/
|
|
314
|
-
toGanZhiYear: (lYear: any) =>
|
|
225
|
+
toGanZhiYear: (lYear: any) => any;
|
|
315
226
|
/**
|
|
316
227
|
* 公历月、日判断所属星座
|
|
317
228
|
* @param cMonth [description]
|
|
@@ -324,7 +235,7 @@ export declare const lunarCalendar: {
|
|
|
324
235
|
* @param offset 相对甲子的偏移量
|
|
325
236
|
* @return Cn string
|
|
326
237
|
*/
|
|
327
|
-
toGanZhi: (offset: any) =>
|
|
238
|
+
toGanZhi: (offset: any) => any;
|
|
328
239
|
/**
|
|
329
240
|
* 传入公历(!)y年获得该年第n个节气的公历日期
|
|
330
241
|
* @param y y公历年(1900-2100)
|
|
@@ -339,7 +250,7 @@ export declare const lunarCalendar: {
|
|
|
339
250
|
* @return Cn string
|
|
340
251
|
* @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
|
|
341
252
|
*/
|
|
342
|
-
toChinaMonth: (m: any) =>
|
|
253
|
+
toChinaMonth: (m: any) => any;
|
|
343
254
|
/**
|
|
344
255
|
* 传入农历日期数字返回汉字表示法
|
|
345
256
|
* @param d lunar day
|
|
@@ -353,7 +264,7 @@ export declare const lunarCalendar: {
|
|
|
353
264
|
* @return Cn string
|
|
354
265
|
* @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
|
|
355
266
|
*/
|
|
356
|
-
getAnimal: (y: any) =>
|
|
267
|
+
getAnimal: (y: any) => any;
|
|
357
268
|
/**
|
|
358
269
|
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
|
|
359
270
|
* !important! 公历参数区间1900.1.31~2100.12.31
|
|
@@ -371,22 +282,22 @@ export declare const lunarCalendar: {
|
|
|
371
282
|
lYear: any;
|
|
372
283
|
lMonth: any;
|
|
373
284
|
lDay: number;
|
|
374
|
-
Animal:
|
|
285
|
+
Animal: any;
|
|
375
286
|
IMonthCn: string;
|
|
376
287
|
IDayCn: any;
|
|
377
288
|
cYear: number;
|
|
378
289
|
cMonth: number;
|
|
379
290
|
cDay: number;
|
|
380
|
-
gzYear:
|
|
381
|
-
gzMonth:
|
|
382
|
-
gzDay:
|
|
291
|
+
gzYear: any;
|
|
292
|
+
gzMonth: any;
|
|
293
|
+
gzDay: any;
|
|
383
294
|
isToday: boolean;
|
|
384
295
|
isLeap: boolean;
|
|
385
296
|
nWeek: any;
|
|
386
297
|
ncWeek: string;
|
|
387
298
|
isTerm: boolean;
|
|
388
299
|
Term: any;
|
|
389
|
-
astro:
|
|
300
|
+
astro: any;
|
|
390
301
|
};
|
|
391
302
|
/**
|
|
392
303
|
* 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
|
|
@@ -398,29 +309,5 @@ export declare const lunarCalendar: {
|
|
|
398
309
|
* @return JSON object
|
|
399
310
|
* @eg:console.log(calendar.lunar2solar(1987,9,10));
|
|
400
311
|
*/
|
|
401
|
-
lunar2solar: (y: any, m: any, d: any, isLeapMonth: any) =>
|
|
402
|
-
date: string;
|
|
403
|
-
lunarDate: string;
|
|
404
|
-
festival: any;
|
|
405
|
-
lunarFestival: any;
|
|
406
|
-
lYear: any;
|
|
407
|
-
lMonth: any;
|
|
408
|
-
lDay: number;
|
|
409
|
-
Animal: string;
|
|
410
|
-
IMonthCn: string;
|
|
411
|
-
IDayCn: any;
|
|
412
|
-
cYear: number;
|
|
413
|
-
cMonth: number;
|
|
414
|
-
cDay: number;
|
|
415
|
-
gzYear: string;
|
|
416
|
-
gzMonth: string;
|
|
417
|
-
gzDay: string;
|
|
418
|
-
isToday: boolean;
|
|
419
|
-
isLeap: boolean;
|
|
420
|
-
nWeek: any;
|
|
421
|
-
ncWeek: string;
|
|
422
|
-
isTerm: boolean;
|
|
423
|
-
Term: any;
|
|
424
|
-
astro: string;
|
|
425
|
-
};
|
|
312
|
+
lunar2solar: (y: any, m: any, d: any, isLeapMonth: any) => any;
|
|
426
313
|
};
|
package/dist/pkg/progress.d.ts
CHANGED
package/dist/pkg/useAttrs.d.ts
CHANGED
package/dist/pkg/useRender.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const useRender: () => {
|
|
|
17
17
|
clearable: boolean;
|
|
18
18
|
disabled: boolean;
|
|
19
19
|
showValue: boolean;
|
|
20
|
-
placeholder:
|
|
20
|
+
placeholder: any;
|
|
21
21
|
};
|
|
22
22
|
defaultValue: any;
|
|
23
23
|
events: any;
|
|
@@ -85,7 +85,7 @@ export declare const useRender: () => {
|
|
|
85
85
|
label: string;
|
|
86
86
|
value: any;
|
|
87
87
|
};
|
|
88
|
-
options:
|
|
88
|
+
options: any[];
|
|
89
89
|
methods: any;
|
|
90
90
|
};
|
|
91
91
|
renderBU: (attrs?: any, methods?: any) => {
|
|
@@ -100,7 +100,7 @@ export declare const useRender: () => {
|
|
|
100
100
|
label: string;
|
|
101
101
|
value: any;
|
|
102
102
|
};
|
|
103
|
-
options:
|
|
103
|
+
options: any[];
|
|
104
104
|
methods: any;
|
|
105
105
|
};
|
|
106
106
|
renderNumber: (attrs?: any, methods?: any) => {
|
package/dist/pkg/useTree.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ export declare function extractPathList(menuTree: any): any;
|
|
|
5
5
|
* @param {Array} {pathList 每一项的id组成的数组}
|
|
6
6
|
* @param {return}}
|
|
7
7
|
*/
|
|
8
|
-
export declare function deleteTreeChildren(menuTree: any, pathList?:
|
|
9
|
-
export declare function buildHierarchyTree(menuTree: any, pathList?:
|
|
8
|
+
export declare function deleteTreeChildren(menuTree: any, pathList?: any[]): any[];
|
|
9
|
+
export declare function buildHierarchyTree(menuTree: any, pathList?: any[]): any[];
|
|
10
10
|
/**
|
|
11
11
|
* 广度优先遍历算法,找当前节点
|
|
12
12
|
* @param {Array} tree 原始树,数组
|
|
@@ -21,4 +21,4 @@ export declare function getNodeByUniqueId(menuTree: any, uniqueId: any): any;
|
|
|
21
21
|
* @param {Object} fields 唯一uniqueId
|
|
22
22
|
* @return {menuTree} 追加字段后的树
|
|
23
23
|
*/
|
|
24
|
-
export declare function appendFieldByUniqueId(menuTree: Array<any>, uniqueId: Number | String, fields: Object): {}
|
|
24
|
+
export declare function appendFieldByUniqueId(menuTree: Array<any>, uniqueId: Number | String, fields: Object): {};
|