ls-pro-common 3.0.58 → 3.0.59
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/common.css +41 -38
- package/dist/common.js +1 -1
- package/dist/common.js.LICENSE.txt +0 -10
- package/dist/common.min.css +41 -38
- package/dist/common.min.js +1 -1
- package/dist/common.min.js.LICENSE.txt +0 -10
- package/es/components/antd-custom.less +59 -61
- package/es/utils/index.d.ts +55 -26
- package/es/utils/index.js +73 -38
- package/lib/components/antd-custom.less +59 -61
- package/lib/utils/index.d.ts +55 -26
- package/lib/utils/index.js +73 -38
- package/package.json +2 -2
|
@@ -30,16 +30,6 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
30
30
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-is.production.min.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
33
|
/** @license React v16.13.1
|
|
44
34
|
* react-is.production.min.js
|
|
45
35
|
*
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
max-width: min-content !important;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
17
|
.ant-input-has-value:hover {
|
|
20
18
|
.ant-input-clear-icon {
|
|
21
19
|
visibility: visible;
|
|
@@ -61,16 +59,15 @@
|
|
|
61
59
|
}
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
|
|
65
62
|
.ant-btn {
|
|
66
63
|
height: 32px;
|
|
64
|
+
color: var(--ant-primary-color);
|
|
67
65
|
background-color: var(--ant-primary-1);
|
|
68
66
|
border-color: transparent;
|
|
69
|
-
color: var(--ant-primary-color);
|
|
70
67
|
border-radius: 4px;
|
|
71
68
|
|
|
72
69
|
&.ant-btn-lg {
|
|
73
|
-
height: 40px
|
|
70
|
+
height: 40px;
|
|
74
71
|
}
|
|
75
72
|
|
|
76
73
|
&.ant-btn-sm {
|
|
@@ -79,114 +76,113 @@
|
|
|
79
76
|
|
|
80
77
|
&:hover,
|
|
81
78
|
&:focus {
|
|
79
|
+
color: var(--ant-primary-color);
|
|
82
80
|
background-color: var(--ant-primary-2);
|
|
83
81
|
border-color: transparent;
|
|
84
|
-
color: var(--ant-primary-color);
|
|
85
82
|
}
|
|
86
83
|
|
|
87
84
|
&:active {
|
|
85
|
+
color: var(--ant-primary-color);
|
|
88
86
|
background-color: var(--ant-primary-3);
|
|
89
87
|
border-color: transparent;
|
|
90
|
-
color: var(--ant-primary-color);
|
|
91
88
|
}
|
|
92
89
|
|
|
93
90
|
&[disabled],
|
|
94
91
|
&[disabled]:hover,
|
|
95
92
|
&[disabled]:focus,
|
|
96
93
|
&[disabled]:active {
|
|
97
|
-
|
|
94
|
+
color: #d9d9d9;
|
|
95
|
+
background-color: #eaeef2;
|
|
98
96
|
border-color: transparent;
|
|
99
|
-
color: #D9D9D9;
|
|
100
97
|
}
|
|
101
98
|
}
|
|
102
99
|
|
|
103
100
|
.ant-btn-primary {
|
|
101
|
+
color: #fff;
|
|
104
102
|
background-color: var(--ant-primary-color);
|
|
105
103
|
border-color: transparent;
|
|
106
|
-
color: #fff;
|
|
107
104
|
|
|
108
105
|
&:hover,
|
|
109
106
|
&:focus {
|
|
107
|
+
color: #fff;
|
|
110
108
|
background-color: var(--ant-primary-color-hover);
|
|
111
109
|
border-color: transparent;
|
|
112
|
-
color: #fff;
|
|
113
110
|
}
|
|
114
111
|
|
|
115
112
|
&:active {
|
|
113
|
+
color: #fff;
|
|
116
114
|
background-color: var(--ant-primary-color-active);
|
|
117
115
|
border-color: transparent;
|
|
118
|
-
color: #fff;
|
|
119
116
|
}
|
|
120
117
|
|
|
121
118
|
&[disabled],
|
|
122
119
|
&[disabled]:hover,
|
|
123
120
|
&[disabled]:focus,
|
|
124
121
|
&[disabled]:active {
|
|
122
|
+
color: #fff;
|
|
125
123
|
background-color: var(--ant-primary-color-outline);
|
|
126
124
|
border-color: transparent;
|
|
127
|
-
color: #fff;
|
|
128
125
|
}
|
|
129
126
|
}
|
|
130
127
|
|
|
131
128
|
.ant-btn-dashed,
|
|
132
129
|
.ant-btn-gray {
|
|
133
|
-
|
|
134
|
-
color: #
|
|
130
|
+
color: #1b1f2a;
|
|
131
|
+
background-color: #f1f4f6;
|
|
135
132
|
|
|
136
133
|
&:hover,
|
|
137
134
|
&:focus {
|
|
138
|
-
|
|
139
|
-
color: #
|
|
135
|
+
color: #1b1f2a;
|
|
136
|
+
background-color: #d2d6dd;
|
|
140
137
|
}
|
|
141
138
|
|
|
142
139
|
&:active {
|
|
143
|
-
|
|
144
|
-
color: #
|
|
140
|
+
color: #1b1f2a;
|
|
141
|
+
background-color: #b5bbc5;
|
|
145
142
|
}
|
|
146
143
|
|
|
147
144
|
&[disabled],
|
|
148
145
|
&[disabled]:hover,
|
|
149
146
|
&[disabled]:focus,
|
|
150
147
|
&[disabled]:active {
|
|
151
|
-
background-color: #F1F4F6;
|
|
152
148
|
color: #818999;
|
|
149
|
+
background-color: #f1f4f6;
|
|
153
150
|
}
|
|
154
151
|
}
|
|
155
152
|
|
|
156
|
-
|
|
157
153
|
.ant-btn-dangerous {
|
|
158
|
-
|
|
154
|
+
color: #f5222d;
|
|
155
|
+
background-color: #ffccc7;
|
|
159
156
|
border-color: transparent;
|
|
160
|
-
color: #F5222D;
|
|
161
157
|
|
|
162
158
|
&:hover,
|
|
163
159
|
&:focus {
|
|
164
|
-
|
|
160
|
+
color: #f5222d;
|
|
161
|
+
background-color: #fff1f0;
|
|
165
162
|
border-color: transparent;
|
|
166
|
-
color: #F5222D;
|
|
167
163
|
}
|
|
168
164
|
|
|
169
165
|
&:active {
|
|
170
|
-
|
|
166
|
+
color: #f5222d;
|
|
167
|
+
background-color: #ffa39e;
|
|
171
168
|
border-color: transparent;
|
|
172
|
-
color: #F5222D;
|
|
173
169
|
}
|
|
174
170
|
|
|
175
171
|
&[disabled],
|
|
176
172
|
&[disabled]:hover,
|
|
177
173
|
&[disabled]:focus,
|
|
178
174
|
&[disabled]:active {
|
|
179
|
-
|
|
175
|
+
color: #ffa39e;
|
|
176
|
+
background-color: #ffccc7;
|
|
180
177
|
border-color: transparent;
|
|
181
|
-
color: #FFA39E;
|
|
182
178
|
}
|
|
183
179
|
}
|
|
184
180
|
|
|
185
181
|
.ant-btn-link {
|
|
182
|
+
padding: 4px 8px;
|
|
183
|
+
color: var(--ant-primary-color);
|
|
186
184
|
background-color: transparent;
|
|
187
185
|
border-color: transparent;
|
|
188
|
-
color: var(--ant-primary-color);
|
|
189
|
-
padding: 4px 8px;
|
|
190
186
|
|
|
191
187
|
&[disabled],
|
|
192
188
|
&[disabled]:hover,
|
|
@@ -212,15 +208,15 @@
|
|
|
212
208
|
&[disabled]:hover,
|
|
213
209
|
&[disabled]:focus,
|
|
214
210
|
&[disabled]:active {
|
|
215
|
-
color: #
|
|
211
|
+
color: #a7b5cc;
|
|
216
212
|
}
|
|
217
213
|
}
|
|
218
214
|
|
|
219
215
|
.ant-btn-text {
|
|
216
|
+
padding: 4px 8px;
|
|
217
|
+
color: #8c8c8c;
|
|
220
218
|
background-color: transparent;
|
|
221
219
|
border-color: transparent;
|
|
222
|
-
color: #8C8C8C;
|
|
223
|
-
padding: 4px 8px;
|
|
224
220
|
|
|
225
221
|
&[disabled],
|
|
226
222
|
&[disabled]:hover,
|
|
@@ -231,7 +227,6 @@
|
|
|
231
227
|
&:active {
|
|
232
228
|
background-color: transparent;
|
|
233
229
|
border-color: transparent;
|
|
234
|
-
|
|
235
230
|
}
|
|
236
231
|
|
|
237
232
|
&:hover,
|
|
@@ -253,7 +248,6 @@
|
|
|
253
248
|
animation-fill-mode: none !important;
|
|
254
249
|
}
|
|
255
250
|
|
|
256
|
-
|
|
257
251
|
.ant-descriptions-item-label {
|
|
258
252
|
color: #8c8c8c !important;
|
|
259
253
|
|
|
@@ -283,18 +277,18 @@
|
|
|
283
277
|
}
|
|
284
278
|
}
|
|
285
279
|
|
|
286
|
-
.ant-table-filter-dropdown .ant-checkbox-wrapper+span,
|
|
287
|
-
.ant-table-filter-dropdown-submenu .ant-checkbox-wrapper+span {
|
|
280
|
+
.ant-table-filter-dropdown .ant-checkbox-wrapper + span,
|
|
281
|
+
.ant-table-filter-dropdown-submenu .ant-checkbox-wrapper + span {
|
|
288
282
|
display: inline-block;
|
|
283
|
+
width: 200px;
|
|
289
284
|
overflow: hidden;
|
|
290
285
|
text-overflow: ellipsis;
|
|
291
|
-
width: 200px;
|
|
292
286
|
}
|
|
293
287
|
|
|
294
288
|
// 以下为调整字体大小及行高
|
|
295
289
|
|
|
296
290
|
.ant-picker:not(.ant-picker-large, .ant-picker-sm),
|
|
297
|
-
.ant-input:not(.ant-input-lg, .ant-input-sm) .ant-form-item-label>label,
|
|
291
|
+
.ant-input:not(.ant-input-lg, .ant-input-sm) .ant-form-item-label > label,
|
|
298
292
|
.ant-form:not(.ant-form-large, .ant-form-sm) .ant-form-item,
|
|
299
293
|
.ant-input:not(.ant-input-lg, .ant-input-sm),
|
|
300
294
|
.ant-input-number:not(.ant-input-number-lg, .ant-input-number-sm),
|
|
@@ -306,7 +300,7 @@
|
|
|
306
300
|
|
|
307
301
|
.ant-btn:not(.ant-btn-lg, .ant-btn-sm),
|
|
308
302
|
.ant-select-single:not(.ant-select-customize-input) .ant-select-selector,
|
|
309
|
-
.ant-input:not(.ant-input-lg, .ant-input-sm) .ant-form-item-label>label {
|
|
303
|
+
.ant-input:not(.ant-input-lg, .ant-input-sm) .ant-form-item-label > label {
|
|
310
304
|
height: 28px !important;
|
|
311
305
|
min-height: 28px !important;
|
|
312
306
|
}
|
|
@@ -319,8 +313,12 @@
|
|
|
319
313
|
margin-bottom: 12px !important;
|
|
320
314
|
}
|
|
321
315
|
|
|
322
|
-
.ant-select-single:not(.ant-select-lg, .ant-select-sm)
|
|
323
|
-
.ant-select-
|
|
316
|
+
.ant-select-single:not(.ant-select-lg, .ant-select-sm)
|
|
317
|
+
.ant-select-selector
|
|
318
|
+
.ant-select-selection-item,
|
|
319
|
+
.ant-select-single:not(.ant-select-lg, .ant-select-sm)
|
|
320
|
+
.ant-select-selector
|
|
321
|
+
.ant-select-selection-placeholder {
|
|
324
322
|
line-height: 26px !important;
|
|
325
323
|
}
|
|
326
324
|
|
|
@@ -340,7 +338,6 @@
|
|
|
340
338
|
padding-bottom: 2px !important;
|
|
341
339
|
}
|
|
342
340
|
|
|
343
|
-
|
|
344
341
|
.ant-picker-range:not(.ant-picker-large, .ant-picker-sm) {
|
|
345
342
|
padding: 2px 4px !important;
|
|
346
343
|
|
|
@@ -356,12 +353,12 @@
|
|
|
356
353
|
right: 3px !important;
|
|
357
354
|
}
|
|
358
355
|
|
|
359
|
-
.ant-picker-input>input {
|
|
356
|
+
.ant-picker-input > input {
|
|
360
357
|
letter-spacing: -0.8px !important;
|
|
361
358
|
}
|
|
362
359
|
}
|
|
363
360
|
|
|
364
|
-
.ant-table-filter-dropdown .ant-dropdown-menu-item .ant-checkbox+span {
|
|
361
|
+
.ant-table-filter-dropdown .ant-dropdown-menu-item .ant-checkbox + span {
|
|
365
362
|
width: 230px;
|
|
366
363
|
}
|
|
367
364
|
|
|
@@ -379,31 +376,31 @@
|
|
|
379
376
|
max-width: 200px;
|
|
380
377
|
|
|
381
378
|
ul {
|
|
382
|
-
height: 0;
|
|
383
379
|
flex: auto;
|
|
384
|
-
|
|
385
|
-
overflow: auto;
|
|
380
|
+
height: 0;
|
|
386
381
|
margin: 0;
|
|
387
382
|
padding: 8px;
|
|
383
|
+
overflow: auto;
|
|
384
|
+
list-style: none;
|
|
388
385
|
border-inline-end: 1px solid rgba(5, 5, 5, 0.06);
|
|
389
386
|
|
|
390
387
|
li {
|
|
388
|
+
margin-top: 8px;
|
|
391
389
|
overflow: hidden;
|
|
392
390
|
white-space: nowrap;
|
|
393
391
|
text-overflow: ellipsis;
|
|
394
392
|
border-radius: 4px;
|
|
395
|
-
padding-inline: 8px;
|
|
396
|
-
padding-block: 1px;
|
|
397
393
|
cursor: pointer;
|
|
398
394
|
transition: all 0.3s;
|
|
399
|
-
|
|
395
|
+
padding-inline: 8px;
|
|
396
|
+
padding-block: 1px;
|
|
400
397
|
}
|
|
401
398
|
}
|
|
402
399
|
}
|
|
403
400
|
}
|
|
404
401
|
|
|
405
402
|
.ant-table td.ant-table-cell {
|
|
406
|
-
color: #5b5b5b
|
|
403
|
+
color: #5b5b5b;
|
|
407
404
|
}
|
|
408
405
|
|
|
409
406
|
.ant-pro-form-query-filter.ant-form-vertical {
|
|
@@ -417,26 +414,27 @@
|
|
|
417
414
|
height: 28px;
|
|
418
415
|
}
|
|
419
416
|
|
|
420
|
-
.ant-input-group.ant-input-group-compact
|
|
417
|
+
.ant-input-group.ant-input-group-compact > *:first-child {
|
|
421
418
|
border-radius: 0 !important;
|
|
422
419
|
border-top-left-radius: 4px !important;
|
|
423
420
|
border-bottom-left-radius: 4px !important;
|
|
424
421
|
}
|
|
425
422
|
|
|
426
|
-
.ant-input-group.ant-input-group-compact
|
|
423
|
+
.ant-input-group.ant-input-group-compact > *:last-child {
|
|
427
424
|
border-radius: 0 !important;
|
|
428
|
-
border-top-
|
|
429
|
-
border-bottom-
|
|
425
|
+
border-top-right-radius: 4px !important;
|
|
426
|
+
border-bottom-right-radius: 4px !important;
|
|
427
|
+
}
|
|
428
|
+
.ant-input-group > .ant-input:not(:first-child):not(:last-child) {
|
|
429
|
+
line-height: 1.5;
|
|
430
430
|
}
|
|
431
|
-
|
|
432
431
|
}
|
|
433
432
|
|
|
434
|
-
.ant-input-number-group
|
|
433
|
+
.ant-input-number-group > .ant-input-number:not(:first-child):not(:last-child) {
|
|
435
434
|
border-radius: 0 !important;
|
|
436
435
|
}
|
|
437
436
|
|
|
438
437
|
.ant-pro-table {
|
|
439
|
-
|
|
440
438
|
.ant-table:not(.ant-table-has-fix-right),
|
|
441
439
|
.ant-table.ant-table-empty {
|
|
442
440
|
.ant-table-container {
|
|
@@ -453,4 +451,4 @@
|
|
|
453
451
|
}
|
|
454
452
|
}
|
|
455
453
|
}
|
|
456
|
-
}
|
|
454
|
+
}
|
package/es/utils/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import React from 'react';
|
|
|
4
4
|
export { throttle, debounce } from 'lodash';
|
|
5
5
|
/**
|
|
6
6
|
* 获取 url 参数
|
|
7
|
+
*
|
|
7
8
|
* @param name
|
|
8
9
|
* @param url
|
|
9
10
|
* @returns
|
|
@@ -11,21 +12,24 @@ export { throttle, debounce } from 'lodash';
|
|
|
11
12
|
export declare const getUrlQuery: (name: string, url?: string) => string;
|
|
12
13
|
export declare const getResourceProps: (name: string) => any;
|
|
13
14
|
/**
|
|
14
|
-
* 设置url传参
|
|
15
|
-
|
|
16
|
-
* @param {
|
|
17
|
-
* @
|
|
18
|
-
|
|
15
|
+
* 设置url传参
|
|
16
|
+
*
|
|
17
|
+
* @param {any} url
|
|
18
|
+
* @param {any} keyvals
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
19
21
|
export declare const setUrlQuery: (url: string, keyvals?: Record<string, any>) => string;
|
|
20
22
|
/**
|
|
21
23
|
* 日期格式化
|
|
24
|
+
*
|
|
22
25
|
* @param dt 日期
|
|
23
|
-
* @param showTime 是否显示时间
|
|
26
|
+
* @param showTime 是否显示时间 默认为 true
|
|
24
27
|
* @returns YYYY-MM-DD
|
|
25
28
|
*/
|
|
26
29
|
export declare const dateFormat: (dt?: Date | null | undefined, showTime?: boolean) => string;
|
|
27
30
|
/**
|
|
28
31
|
* 给 url 添加网关
|
|
32
|
+
*
|
|
29
33
|
* @param url 原url,以 / 打头
|
|
30
34
|
* @param gatewayKey 设置gateway关键字 默认为 'gateway'
|
|
31
35
|
* @param defGateway 默认网关 ''
|
|
@@ -34,12 +38,14 @@ export declare const dateFormat: (dt?: Date | null | undefined, showTime?: boole
|
|
|
34
38
|
export declare const toGatewayUrl: (url: string, gatewayKey?: string, defGateway?: string) => string;
|
|
35
39
|
/**
|
|
36
40
|
* 设置文档title
|
|
37
|
-
*
|
|
41
|
+
*
|
|
42
|
+
* @param {any} title
|
|
38
43
|
* @returns
|
|
39
44
|
*/
|
|
40
45
|
export declare const setTitle: (title: string) => void;
|
|
41
46
|
/**
|
|
42
47
|
* 日期格式化
|
|
48
|
+
*
|
|
43
49
|
* @param dt 日期
|
|
44
50
|
* @param showTime 是否显示时间 默认true
|
|
45
51
|
* @returns YYYY-MM-DD hh:mm:ss
|
|
@@ -47,16 +53,19 @@ export declare const setTitle: (title: string) => void;
|
|
|
47
53
|
export declare const formatDate: (dt?: Date | null | undefined, showTime?: boolean) => string;
|
|
48
54
|
/**
|
|
49
55
|
* 返回当前日期
|
|
56
|
+
*
|
|
50
57
|
* @returns YYYY-MM-DD
|
|
51
58
|
*/
|
|
52
59
|
export declare const today: () => string;
|
|
53
60
|
/**
|
|
54
61
|
* 返回当前日期时间
|
|
62
|
+
*
|
|
55
63
|
* @returns YYYY-MM-DD hh:mm:ss
|
|
56
64
|
*/
|
|
57
65
|
export declare const now: () => string;
|
|
58
66
|
/**
|
|
59
67
|
* 时间加减
|
|
68
|
+
*
|
|
60
69
|
* @param dt 原始时间,传 null 为当前时间
|
|
61
70
|
* @param addDay 添加添数,可为负数
|
|
62
71
|
* @param addMonth 添加月数,可为负数
|
|
@@ -66,6 +75,7 @@ export declare const now: () => string;
|
|
|
66
75
|
export declare const dateAdd: (dt: Date | null, addDay: number, addMonth?: number, addYear?: number) => string;
|
|
67
76
|
/**
|
|
68
77
|
* 当前时间加减
|
|
78
|
+
*
|
|
69
79
|
* @param addDay 添加添数,可为负数
|
|
70
80
|
* @param addMonth 添加月数,可为负数
|
|
71
81
|
* @param addYear 添加年数,可以负责
|
|
@@ -74,6 +84,7 @@ export declare const dateAdd: (dt: Date | null, addDay: number, addMonth?: numbe
|
|
|
74
84
|
export declare const nowAdd: (addDay: number, addMonth?: number, addYear?: number) => string;
|
|
75
85
|
/**
|
|
76
86
|
* 当前日期加减
|
|
87
|
+
*
|
|
77
88
|
* @param addDay 添加添数,可为负数
|
|
78
89
|
* @param addMonth 添加月数,可为负数
|
|
79
90
|
* @param addYear 添加年数,可以负责
|
|
@@ -82,52 +93,58 @@ export declare const nowAdd: (addDay: number, addMonth?: number, addYear?: numbe
|
|
|
82
93
|
export declare const todayAdd: (addDay: number, addMonth?: number, addYear?: number) => string;
|
|
83
94
|
/**
|
|
84
95
|
* 千位符格式化数值
|
|
96
|
+
*
|
|
85
97
|
* @param num 数值
|
|
86
98
|
* @param dec 小数位数,默认为2位小数
|
|
87
|
-
* @returns
|
|
99
|
+
* @returns Xx,xxx.xx
|
|
88
100
|
*/
|
|
89
101
|
export declare const formatMoney: (num: number | string, dec?: number) => string;
|
|
90
102
|
/**
|
|
91
103
|
* 获取Cookie
|
|
92
|
-
*
|
|
104
|
+
*
|
|
105
|
+
* @param {String} name Cookie名
|
|
93
106
|
* @returns
|
|
94
107
|
*/
|
|
95
108
|
export declare const getCookie: (name: string) => string | null;
|
|
96
109
|
/**
|
|
97
110
|
* 设置Cookie
|
|
98
|
-
*
|
|
99
|
-
* @param {
|
|
100
|
-
* @param {
|
|
111
|
+
*
|
|
112
|
+
* @param {any} key Cookie名称
|
|
113
|
+
* @param {any} value Cookie 值
|
|
114
|
+
* @param {Number} day 有效天数 默认1天,
|
|
101
115
|
*/
|
|
102
116
|
export declare const setCookie: (key: string, value: string | number, day?: number, sameSite?: boolean) => void;
|
|
103
117
|
/**
|
|
104
118
|
* 判断是否登录
|
|
119
|
+
*
|
|
105
120
|
* @returns
|
|
106
121
|
*/
|
|
107
122
|
export declare const isLogin: () => boolean;
|
|
108
123
|
export declare const getFullScreenElement: () => any;
|
|
109
124
|
/**
|
|
110
125
|
* 设置本地缓存
|
|
111
|
-
*
|
|
112
|
-
* @param {
|
|
113
|
-
* @param {
|
|
126
|
+
*
|
|
127
|
+
* @param {String} key 关键字
|
|
128
|
+
* @param {Object} data 值
|
|
129
|
+
* @param {Boolean} session 保存到 sessionStorage 还是 localStorage,默认 localStorage
|
|
114
130
|
*/
|
|
115
131
|
export declare const setCache: (key: string, data: any, session?: boolean) => void;
|
|
116
132
|
/**
|
|
117
133
|
* 读取本地缓存
|
|
118
|
-
*
|
|
119
|
-
* @param {
|
|
134
|
+
*
|
|
135
|
+
* @param {String} key 关键字
|
|
136
|
+
* @param {boolean} session 从 sessionStorage 取数还是从 localStorage 中取数 默认从 localStorage
|
|
120
137
|
* @returns 关键字对应的值
|
|
121
138
|
*/
|
|
122
139
|
export declare const getCache: (key: string, session?: boolean) => string | null;
|
|
123
140
|
/**
|
|
124
141
|
* 读取本地缓存,优先从sessionStorage 取,取不到时再从 localStorage取
|
|
142
|
+
*
|
|
125
143
|
* @param key
|
|
126
144
|
* @returns
|
|
127
145
|
*/
|
|
128
146
|
export declare const getCacheSessionFirst: (key: string) => string | null;
|
|
129
147
|
/**
|
|
130
|
-
*
|
|
131
148
|
* @param key 关键字,不传清除所有
|
|
132
149
|
* @param session 是否session storage , 默认 localStorage
|
|
133
150
|
*/
|
|
@@ -140,6 +157,7 @@ export declare const showWarn: (text: string, duration?: number) => void;
|
|
|
140
157
|
export declare const showSuccess: (text: string, duration?: number) => void;
|
|
141
158
|
/**
|
|
142
159
|
* 弹框提示
|
|
160
|
+
*
|
|
143
161
|
* @param text 提示信息
|
|
144
162
|
* @param title 标题,默认 系统提示
|
|
145
163
|
* @param type 类型
|
|
@@ -152,15 +170,17 @@ export declare const exitAlert: () => void;
|
|
|
152
170
|
/** @name 显示确认 */
|
|
153
171
|
export declare const showConfirm: (text: string, title?: string) => Promise<unknown>;
|
|
154
172
|
/**
|
|
155
|
-
*
|
|
173
|
+
* Token过期重新登录
|
|
174
|
+
*
|
|
156
175
|
* @returns
|
|
157
176
|
*/
|
|
158
177
|
export declare const reLogin: () => void;
|
|
159
178
|
/**
|
|
160
179
|
* 日期组选择转换
|
|
180
|
+
*
|
|
161
181
|
* @param values 选择的值
|
|
162
|
-
* @param startField
|
|
163
|
-
* @param endField
|
|
182
|
+
* @param startField 第一个字段
|
|
183
|
+
* @param endField 第二个字段
|
|
164
184
|
* @param endSuffix
|
|
165
185
|
* @returns
|
|
166
186
|
*/
|
|
@@ -179,6 +199,7 @@ export declare const yesnoList: {
|
|
|
179
199
|
}[];
|
|
180
200
|
/**
|
|
181
201
|
* 遍历树
|
|
202
|
+
*
|
|
182
203
|
* @param list 树对象
|
|
183
204
|
* @param fn 回调函数
|
|
184
205
|
* @param children 树属性字段
|
|
@@ -186,6 +207,7 @@ export declare const yesnoList: {
|
|
|
186
207
|
export declare const treeEach: (list: any[], fn: (item: any, index: any, list: any[]) => void, children?: string) => void;
|
|
187
208
|
/**
|
|
188
209
|
* 查询数
|
|
210
|
+
*
|
|
189
211
|
* @param list 树对象
|
|
190
212
|
* @param key 查询属性
|
|
191
213
|
* @param val 查询值
|
|
@@ -195,6 +217,7 @@ export declare const treeEach: (list: any[], fn: (item: any, index: any, list: a
|
|
|
195
217
|
export declare const treeFind: (list: any[], key: string, val: any, children?: string) => any;
|
|
196
218
|
/**
|
|
197
219
|
* 处理普通的尺码横排
|
|
220
|
+
*
|
|
198
221
|
* @param orgSizeHeader 后端返回的原始尺码组表头
|
|
199
222
|
* @param typeWidth 尺码组宽 sizeTypeNo,默认120
|
|
200
223
|
* @param sizeWidth 尺码宽f1~f100, 默认100
|
|
@@ -203,13 +226,15 @@ export declare const treeFind: (list: any[], key: string, val: any, children?: s
|
|
|
203
226
|
export declare const handleSizeCols: (orgSizeHeader: any[], typeWidth?: number, sizeWidth?: number) => any[];
|
|
204
227
|
/**
|
|
205
228
|
* 绑定事件
|
|
206
|
-
*
|
|
207
|
-
* @param
|
|
208
|
-
* @param
|
|
229
|
+
*
|
|
230
|
+
* @param eventName 事件名
|
|
231
|
+
* @param fn 调用函数
|
|
232
|
+
* @param el 源对象,默认为window
|
|
209
233
|
*/
|
|
210
234
|
export declare const on: (eventName: string, fn: Function, el: any | undefined) => void;
|
|
211
235
|
/**
|
|
212
236
|
* 解绑事件
|
|
237
|
+
*
|
|
213
238
|
* @param eventName 事件名
|
|
214
239
|
* @param fn 调用函数
|
|
215
240
|
* @param el 源对象,默认为window
|
|
@@ -217,21 +242,23 @@ export declare const on: (eventName: string, fn: Function, el: any | undefined)
|
|
|
217
242
|
export declare const off: (eventName: string, fn: Function, el: any | undefined) => void;
|
|
218
243
|
/**
|
|
219
244
|
* 打印预览
|
|
245
|
+
*
|
|
220
246
|
* @param templateNo 打印模板编码
|
|
221
247
|
* @param reqUrl 业务请求api
|
|
222
248
|
* @param bodyParam Post传参数
|
|
223
|
-
* @param param
|
|
249
|
+
* @param param Get传参数
|
|
224
250
|
* @param method 请求方式,默认post
|
|
225
251
|
* @returns
|
|
226
252
|
*/
|
|
227
253
|
export declare const printView: (templateNo: string, reqUrl: string, bodyParam?: any, param?: any, method?: 'POST' | 'GET') => any;
|
|
228
254
|
/**
|
|
229
255
|
* 直接打印
|
|
256
|
+
*
|
|
230
257
|
* @param taskName 打印任务名
|
|
231
258
|
* @param templateNo 打印模板
|
|
232
259
|
* @param reqUrl 业务请求api
|
|
233
260
|
* @param bodyParam Post传参数
|
|
234
|
-
* @param param
|
|
261
|
+
* @param param Get传参数
|
|
235
262
|
* @param method 请求方式,默认post
|
|
236
263
|
* @returns
|
|
237
264
|
*/
|
|
@@ -268,12 +295,14 @@ export declare const getCompanyId: () => string | undefined;
|
|
|
268
295
|
export declare const appPath: (path?: string) => any;
|
|
269
296
|
/**
|
|
270
297
|
* 深度复制对象
|
|
298
|
+
*
|
|
271
299
|
* @param obj
|
|
272
300
|
* @returns
|
|
273
301
|
*/
|
|
274
302
|
export declare const deepClone: (obj: any) => any;
|
|
275
303
|
/**
|
|
276
304
|
* 在主工程中打开模块
|
|
305
|
+
*
|
|
277
306
|
* @param option {path:模块路由,需要加工程编码, resourceId: 资源Id,两者传一个即可,data:参数}
|
|
278
307
|
*/
|
|
279
308
|
export declare const openPageInMain: (option: {
|