ls-pro-common 1.1.4 → 3.0.0
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 +420 -108
- package/dist/common.js +1 -1
- package/dist/common.less +1 -0
- package/dist/common.min.css +420 -108
- package/dist/common.min.js +1 -1
- package/es/components/DtlLayout.d.ts +5 -3
- package/es/components/DtlLayout.js +29 -24
- package/es/components/GroupTip.d.ts +10 -0
- package/es/components/GroupTip.js +31 -0
- package/es/components/Permission.js +5 -2
- package/es/components/antd-custom.less +207 -0
- package/es/components/common.less +153 -159
- package/es/hooks/useSingle/index.js +1 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +3 -3
- package/es/utils/index.js +6 -0
- package/lib/components/DtlLayout.d.ts +5 -3
- package/lib/components/DtlLayout.js +28 -23
- package/lib/components/GroupTip.d.ts +10 -0
- package/lib/components/GroupTip.js +39 -0
- package/lib/components/Permission.js +5 -2
- package/lib/components/antd-custom.less +207 -0
- package/lib/components/common.less +153 -159
- package/lib/hooks/useSingle/index.js +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +7 -0
- package/lib/utils/index.d.ts +3 -3
- package/lib/utils/index.js +6 -0
- package/package.json +5 -4
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
body {
|
|
2
|
-
--ant-primary-color : #
|
|
3
|
-
--ant-primary-color-hover : #
|
|
4
|
-
--ant-primary-color-active : #
|
|
5
|
-
--ant-primary-color-outline : rgba(
|
|
2
|
+
--ant-primary-color : #0E55CB;
|
|
3
|
+
--ant-primary-color-hover : #3277d9;
|
|
4
|
+
--ant-primary-color-active : #033ca6;
|
|
5
|
+
--ant-primary-color-outline : rgba(14, 85, 203, 0.2);
|
|
6
6
|
--ant-primary-1 : #e6f4ff;
|
|
7
|
-
--ant-primary-2 : #
|
|
8
|
-
--ant-primary-3 : #
|
|
9
|
-
--ant-primary-4 : #
|
|
10
|
-
--ant-primary-5 : #
|
|
11
|
-
--ant-primary-6 : #
|
|
12
|
-
--ant-primary-7 : #
|
|
13
|
-
--ant-primary-color-deprecated-pure : #
|
|
14
|
-
--ant-primary-color-deprecated-l-35 : #
|
|
15
|
-
--ant-primary-color-deprecated-l-20 : #
|
|
16
|
-
--ant-primary-color-deprecated-t-20 : #
|
|
17
|
-
--ant-primary-color-deprecated-t-50 : #
|
|
18
|
-
--ant-primary-color-deprecated-f-12 : rgba(
|
|
7
|
+
--ant-primary-2 : #b5dbff;
|
|
8
|
+
--ant-primary-3 : #85baf2;
|
|
9
|
+
--ant-primary-4 : #5a99e6;
|
|
10
|
+
--ant-primary-5 : #3277d9;
|
|
11
|
+
--ant-primary-6 : #0E55CB;
|
|
12
|
+
--ant-primary-7 : #033ca6;
|
|
13
|
+
--ant-primary-color-deprecated-pure : #94b9f8;
|
|
14
|
+
--ant-primary-color-deprecated-l-35 : #94b9f8;
|
|
15
|
+
--ant-primary-color-deprecated-l-20 : #4c8bf3;
|
|
16
|
+
--ant-primary-color-deprecated-t-20 : #3e77d5;
|
|
17
|
+
--ant-primary-color-deprecated-t-50 : #87aae5;
|
|
18
|
+
--ant-primary-color-deprecated-f-12 : rgba(14, 85, 203, 0.12);
|
|
19
19
|
--ant-primary-color-active-deprecated-f-30: rgba(230, 244, 255, 0.3);
|
|
20
20
|
--ant-primary-color-active-deprecated-d-02: #dcf0ff;
|
|
21
21
|
--ant-success-color : #52c41a;
|
|
@@ -36,9 +36,10 @@ body {
|
|
|
36
36
|
--ant-warning-color-outline : rgba(250, 173, 20, 0.2);
|
|
37
37
|
--ant-warning-color-deprecated-bg : #fffbe6;
|
|
38
38
|
--ant-warning-color-deprecated-border : #ffe58f;
|
|
39
|
-
--ant-info-color : #
|
|
39
|
+
--ant-info-color : #0E55CB;
|
|
40
40
|
--ant-info-color-deprecated-bg : #e6f4ff;
|
|
41
|
-
--ant-info-color-deprecated-border : #
|
|
41
|
+
--ant-info-color-deprecated-border : #85baf2;
|
|
42
|
+
|
|
42
43
|
|
|
43
44
|
// --ant-primary-color : #4997E6;
|
|
44
45
|
// --ant-primary-color-hover : #74b7f2;
|
|
@@ -82,52 +83,72 @@ body {
|
|
|
82
83
|
// --ant-info-color-deprecated-border : #ccebff;
|
|
83
84
|
}
|
|
84
85
|
|
|
86
|
+
* ::-webkit-scrollbar-thumb {
|
|
87
|
+
background-color: rgba(101, 100, 99, 0.5);
|
|
88
|
+
border-radius : 6px;
|
|
89
|
+
|
|
90
|
+
&:hover {
|
|
91
|
+
background-color: rgba(101, 100, 99, 0.8);
|
|
92
|
+
border-radius : 6px;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
* ::-webkit-scrollbar {
|
|
97
|
+
width : 8px;
|
|
98
|
+
height : 8px;
|
|
99
|
+
background-color: transparent;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
* {
|
|
103
|
+
scrollbar-width: thin;
|
|
104
|
+
}
|
|
105
|
+
|
|
85
106
|
|
|
86
107
|
body.theme-yellow {
|
|
87
|
-
--ant-primary-color: #fa8500;
|
|
88
|
-
--ant-primary-color-hover: #ffa229;
|
|
89
|
-
--ant-primary-color-active: #d46a00;
|
|
90
|
-
--ant-primary-color-outline: rgba(250, 133, 0, 0.2);
|
|
91
|
-
--ant-primary-bg: #fff;
|
|
92
|
-
--ant-primary-side: #fff7e6;
|
|
93
|
-
--ant-primary-0: #ffd9ad;
|
|
94
|
-
--ant-primary-1: #fff7e6;
|
|
95
|
-
--ant-primary-2: #ffe0a3;
|
|
96
|
-
--ant-primary-3: #ffce7a;
|
|
97
|
-
--ant-primary-4: #ffba52;
|
|
98
|
-
--ant-primary-5: #ffa229;
|
|
99
|
-
--ant-primary-6: #fa8500;
|
|
100
|
-
--ant-primary-7: #d46a00;
|
|
101
|
-
--ant-primary-color-deprecated-pure: #ffd9ad;
|
|
102
|
-
--ant-primary-color-deprecated-l-35: #ffd9ad;
|
|
103
|
-
--ant-primary-color-deprecated-l-20: #ffb561;
|
|
104
|
-
--ant-primary-color-deprecated-t-20: #fb9d33;
|
|
105
|
-
--ant-primary-color-deprecated-t-50: #fdc280;
|
|
106
|
-
--ant-primary-color-deprecated-f-12: rgba(250, 133, 0, 0.12);
|
|
108
|
+
--ant-primary-color : #fa8500;
|
|
109
|
+
--ant-primary-color-hover : #ffa229;
|
|
110
|
+
--ant-primary-color-active : #d46a00;
|
|
111
|
+
--ant-primary-color-outline : rgba(250, 133, 0, 0.2);
|
|
112
|
+
--ant-primary-bg : #fff;
|
|
113
|
+
--ant-primary-side : #fff7e6;
|
|
114
|
+
--ant-primary-0 : #ffd9ad;
|
|
115
|
+
--ant-primary-1 : #fff7e6;
|
|
116
|
+
--ant-primary-2 : #ffe0a3;
|
|
117
|
+
--ant-primary-3 : #ffce7a;
|
|
118
|
+
--ant-primary-4 : #ffba52;
|
|
119
|
+
--ant-primary-5 : #ffa229;
|
|
120
|
+
--ant-primary-6 : #fa8500;
|
|
121
|
+
--ant-primary-7 : #d46a00;
|
|
122
|
+
--ant-primary-color-deprecated-pure : #ffd9ad;
|
|
123
|
+
--ant-primary-color-deprecated-l-35 : #ffd9ad;
|
|
124
|
+
--ant-primary-color-deprecated-l-20 : #ffb561;
|
|
125
|
+
--ant-primary-color-deprecated-t-20 : #fb9d33;
|
|
126
|
+
--ant-primary-color-deprecated-t-50 : #fdc280;
|
|
127
|
+
--ant-primary-color-deprecated-f-12 : rgba(250, 133, 0, 0.12);
|
|
107
128
|
--ant-primary-color-active-deprecated-f-30: rgba(255, 247, 230, 0.3);
|
|
108
129
|
--ant-primary-color-active-deprecated-d-02: #fff4dc;
|
|
109
|
-
--ant-success-color: #52c41a;
|
|
110
|
-
--ant-success-color-hover: #73d13d;
|
|
111
|
-
--ant-success-color-active: #389e0d;
|
|
112
|
-
--ant-success-color-outline: rgba(82, 196, 26, 0.2);
|
|
113
|
-
--ant-success-color-deprecated-bg: #f6ffed;
|
|
114
|
-
--ant-success-color-deprecated-border: #b7eb8f;
|
|
115
|
-
--ant-error-color: #ff4d4f;
|
|
116
|
-
--ant-error-color-hover: #ff7875;
|
|
117
|
-
--ant-error-color-active: #d9363e;
|
|
118
|
-
--ant-error-color-outline: rgba(255, 77, 79, 0.2);
|
|
119
|
-
--ant-error-color-deprecated-bg: #fff2f0;
|
|
120
|
-
--ant-error-color-deprecated-border: #ffccc7;
|
|
121
|
-
--ant-warning-color: #faad14;
|
|
122
|
-
--ant-warning-color-hover: #ffc53d;
|
|
123
|
-
--ant-warning-color-active: #d48806;
|
|
124
|
-
--ant-warning-color-outline: rgba(250, 173, 20, 0.2);
|
|
125
|
-
--ant-warning-color-deprecated-bg: #fffbe6;
|
|
126
|
-
--ant-warning-color-deprecated-border: #ffe58f;
|
|
127
|
-
--ant-info-color: #fa8500;
|
|
128
|
-
--ant-info-color-deprecated-bg: #fff7e6;
|
|
129
|
-
--ant-info-color-deprecated-border: #ffce7a;
|
|
130
|
-
--antd-wave-shadow-color: #fa8500;
|
|
130
|
+
--ant-success-color : #52c41a;
|
|
131
|
+
--ant-success-color-hover : #73d13d;
|
|
132
|
+
--ant-success-color-active : #389e0d;
|
|
133
|
+
--ant-success-color-outline : rgba(82, 196, 26, 0.2);
|
|
134
|
+
--ant-success-color-deprecated-bg : #f6ffed;
|
|
135
|
+
--ant-success-color-deprecated-border : #b7eb8f;
|
|
136
|
+
--ant-error-color : #ff4d4f;
|
|
137
|
+
--ant-error-color-hover : #ff7875;
|
|
138
|
+
--ant-error-color-active : #d9363e;
|
|
139
|
+
--ant-error-color-outline : rgba(255, 77, 79, 0.2);
|
|
140
|
+
--ant-error-color-deprecated-bg : #fff2f0;
|
|
141
|
+
--ant-error-color-deprecated-border : #ffccc7;
|
|
142
|
+
--ant-warning-color : #faad14;
|
|
143
|
+
--ant-warning-color-hover : #ffc53d;
|
|
144
|
+
--ant-warning-color-active : #d48806;
|
|
145
|
+
--ant-warning-color-outline : rgba(250, 173, 20, 0.2);
|
|
146
|
+
--ant-warning-color-deprecated-bg : #fffbe6;
|
|
147
|
+
--ant-warning-color-deprecated-border : #ffe58f;
|
|
148
|
+
--ant-info-color : #fa8500;
|
|
149
|
+
--ant-info-color-deprecated-bg : #fff7e6;
|
|
150
|
+
--ant-info-color-deprecated-border : #ffce7a;
|
|
151
|
+
--antd-wave-shadow-color : #fa8500;
|
|
131
152
|
|
|
132
153
|
.ant-table-cell,
|
|
133
154
|
.ant-pro-table-alert-info-content {
|
|
@@ -151,44 +172,41 @@ body.theme-yellow {
|
|
|
151
172
|
left : 0;
|
|
152
173
|
right : 0;
|
|
153
174
|
bottom : 0;
|
|
154
|
-
background :
|
|
175
|
+
background : #f5f5f5;
|
|
155
176
|
display : flex;
|
|
156
177
|
flex-direction: column;
|
|
157
178
|
z-index : 50;
|
|
158
179
|
|
|
159
180
|
.dtl-header {
|
|
160
|
-
display
|
|
161
|
-
justify-items: center;
|
|
162
|
-
padding
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
181
|
+
display : flex;
|
|
182
|
+
justify-items : center;
|
|
183
|
+
padding : 8px 20px;
|
|
184
|
+
background : #fff;
|
|
185
|
+
// border-bottom: 1px solid #f0f0f0;
|
|
186
|
+
|
|
187
|
+
// .dtl-back {
|
|
188
|
+
// display : flex;
|
|
189
|
+
// align-items : center;
|
|
190
|
+
// padding-right: 5px;
|
|
191
|
+
|
|
192
|
+
// >span {
|
|
193
|
+
// padding : 3px;
|
|
194
|
+
// border-radius: 2px;
|
|
195
|
+
|
|
196
|
+
// &:hover {
|
|
197
|
+
// background: var(--ant-primary-2);
|
|
198
|
+
// color : var(--ant-primary-color)
|
|
199
|
+
// }
|
|
200
|
+
// }
|
|
201
|
+
// }
|
|
180
202
|
|
|
181
203
|
.dtl-title {
|
|
182
|
-
font-size:
|
|
204
|
+
font-size: 14px;
|
|
183
205
|
}
|
|
184
206
|
|
|
185
207
|
.dtl-btns {
|
|
186
208
|
flex : 1;
|
|
187
209
|
text-align: right;
|
|
188
|
-
|
|
189
|
-
button+button {
|
|
190
|
-
margin-left: 8px;
|
|
191
|
-
}
|
|
192
210
|
}
|
|
193
211
|
}
|
|
194
212
|
|
|
@@ -196,7 +214,6 @@ body.theme-yellow {
|
|
|
196
214
|
height : 0;
|
|
197
215
|
flex : 1;
|
|
198
216
|
overflow: auto;
|
|
199
|
-
padding : 12px;
|
|
200
217
|
}
|
|
201
218
|
|
|
202
219
|
.dtl-flex {
|
|
@@ -272,33 +289,6 @@ body.theme-yellow {
|
|
|
272
289
|
}
|
|
273
290
|
}
|
|
274
291
|
|
|
275
|
-
.ant-btn {
|
|
276
|
-
border-radius: 4px;
|
|
277
|
-
border-color : var(--ant-primary-color);
|
|
278
|
-
color : var(--ant-primary-color);
|
|
279
|
-
height : 28px;
|
|
280
|
-
line-height : 1.2;
|
|
281
|
-
padding : 2px 15px;
|
|
282
|
-
|
|
283
|
-
&:active {
|
|
284
|
-
border-color: var(--ant-primary-color-hover);
|
|
285
|
-
color : var(--ant-primary-color-hover);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.ant-btn-icon-only {
|
|
290
|
-
padding: 2px 0;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.ant-btn-primary {
|
|
294
|
-
color: #fff;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.ant-btn-dangerous {
|
|
298
|
-
color : var(--ant-error-color);
|
|
299
|
-
border-color: var(--ant-error-color);
|
|
300
|
-
background : #fff;
|
|
301
|
-
}
|
|
302
292
|
|
|
303
293
|
a {
|
|
304
294
|
color: var(--ant-primary-color);
|
|
@@ -399,102 +389,103 @@ a:hover {
|
|
|
399
389
|
}
|
|
400
390
|
|
|
401
391
|
|
|
402
|
-
.
|
|
403
|
-
|
|
404
|
-
|
|
392
|
+
.ls-group-tip {
|
|
393
|
+
display : flex;
|
|
394
|
+
position : relative;
|
|
395
|
+
width : 100%;
|
|
396
|
+
align-items : center;
|
|
397
|
+
background : #fff;
|
|
398
|
+
padding-bottom: 12px;
|
|
399
|
+
.ls-group-divider {
|
|
400
|
+
height : 14px;
|
|
401
|
+
border-right: 2px solid var(--ant-primary-color);
|
|
405
402
|
}
|
|
406
|
-
}
|
|
407
403
|
|
|
408
|
-
.
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
404
|
+
.ls-group-text {
|
|
405
|
+
font-size : 14px;
|
|
406
|
+
color : #181818;
|
|
407
|
+
padding-left: 8px;
|
|
412
408
|
}
|
|
413
409
|
}
|
|
414
410
|
|
|
415
|
-
.ant-row {
|
|
416
|
-
width: 100%;
|
|
417
|
-
}
|
|
418
411
|
|
|
419
|
-
|
|
420
|
-
max-width: min-content !important;
|
|
421
|
-
}
|
|
412
|
+
|
|
422
413
|
//-------------------省市区组件样式-----------
|
|
423
414
|
//最外层盒子
|
|
424
415
|
.ls-area-cascaded-box {
|
|
425
|
-
width: 600px;
|
|
426
|
-
display: flex;
|
|
416
|
+
width : 600px;
|
|
417
|
+
display : flex;
|
|
427
418
|
flex-direction: column;
|
|
428
|
-
transition: all 0.3s;
|
|
419
|
+
transition : all 0.3s;
|
|
429
420
|
|
|
430
421
|
.ls-area-cascaded-header {
|
|
431
|
-
width: 100%;
|
|
432
|
-
padding: 2px 0 6px;
|
|
433
|
-
border-bottom: 1px solid #f0f0f0;
|
|
434
|
-
display: flex;
|
|
435
|
-
flex-direction: row;
|
|
422
|
+
width : 100%;
|
|
423
|
+
padding : 2px 0 6px;
|
|
424
|
+
border-bottom : 1px solid #f0f0f0;
|
|
425
|
+
display : flex;
|
|
426
|
+
flex-direction : row;
|
|
436
427
|
justify-content: space-around;
|
|
437
428
|
justify-content: center;
|
|
438
429
|
|
|
439
430
|
.ls-word-box-display {
|
|
440
|
-
margin: 0 10px;
|
|
441
|
-
font-size: 14px;
|
|
431
|
+
margin : 0 10px;
|
|
432
|
+
font-size : 14px;
|
|
442
433
|
font-weight: 100;
|
|
443
434
|
|
|
444
435
|
button {
|
|
445
|
-
border: none;
|
|
436
|
+
border : none;
|
|
446
437
|
background-color: var(--ant-primary-2, #f0f9ff);
|
|
447
438
|
|
|
448
439
|
&[disabled] {
|
|
449
440
|
background-color: #fafafa !important;
|
|
450
441
|
|
|
451
442
|
.ls-myself-select-title-style {
|
|
452
|
-
color: var(--ant-primary-4, #a3d7ff);
|
|
443
|
+
color : var(--ant-primary-4, #a3d7ff);
|
|
453
444
|
transition: all 0.3s;
|
|
454
445
|
}
|
|
455
446
|
}
|
|
456
447
|
}
|
|
457
448
|
|
|
458
449
|
.ls-myself-select-title-style {
|
|
459
|
-
color: var(--ant-primary-color, rgb(69, 154, 220));
|
|
460
|
-
font-size: 14px;
|
|
450
|
+
color : var(--ant-primary-color, rgb(69, 154, 220));
|
|
451
|
+
font-size : 14px;
|
|
461
452
|
font-weight: 600;
|
|
462
|
-
transition: all 0.3s;
|
|
453
|
+
transition : all 0.3s;
|
|
463
454
|
}
|
|
464
455
|
}
|
|
465
456
|
|
|
466
457
|
.ls-icon-box-display {
|
|
467
|
-
display: flex;
|
|
458
|
+
display : flex;
|
|
468
459
|
align-items: center;
|
|
469
460
|
}
|
|
470
461
|
}
|
|
471
462
|
|
|
472
463
|
.ls-area-cascaded-body {
|
|
473
|
-
width: 100%;
|
|
474
|
-
min-height: 100px;
|
|
475
|
-
max-height: 350px;
|
|
476
|
-
overflow: auto;
|
|
477
|
-
padding: 8px 12px 4px;
|
|
478
|
-
display: grid;
|
|
464
|
+
width : 100%;
|
|
465
|
+
min-height : 100px;
|
|
466
|
+
max-height : 350px;
|
|
467
|
+
overflow : auto;
|
|
468
|
+
padding : 8px 12px 4px;
|
|
469
|
+
display : grid;
|
|
479
470
|
grid-template-columns: repeat(4, 1fr);
|
|
480
|
-
gap: 4px;
|
|
481
|
-
justify-content: start;
|
|
482
|
-
align-content: flex-start;
|
|
483
|
-
align-items: center;
|
|
471
|
+
gap : 4px;
|
|
472
|
+
justify-content : start;
|
|
473
|
+
align-content : flex-start;
|
|
474
|
+
align-items : center;
|
|
484
475
|
|
|
485
476
|
.ls-area-cascaded-span {
|
|
486
477
|
text-align: center;
|
|
487
|
-
padding: 6px 10px;
|
|
478
|
+
padding : 6px 10px;
|
|
488
479
|
|
|
489
480
|
//文字不换行,超出省略
|
|
490
|
-
overflow: hidden;
|
|
481
|
+
overflow : hidden;
|
|
491
482
|
text-overflow: ellipsis;
|
|
492
|
-
white-space: nowrap;
|
|
493
|
-
cursor: pointer;
|
|
483
|
+
white-space : nowrap;
|
|
484
|
+
cursor : pointer;
|
|
494
485
|
|
|
495
486
|
&.ls-area-selected,
|
|
496
487
|
&:hover {
|
|
497
|
-
color: var(--ant-primary-color, rgb(69, 154, 220));
|
|
488
|
+
color : var(--ant-primary-color, rgb(69, 154, 220));
|
|
498
489
|
transition: all 0.3s;
|
|
499
490
|
}
|
|
500
491
|
}
|
|
@@ -508,4 +499,7 @@ a:hover {
|
|
|
508
499
|
}
|
|
509
500
|
}
|
|
510
501
|
|
|
502
|
+
|
|
503
|
+
@import url('./antd-custom.less');
|
|
504
|
+
|
|
511
505
|
//-------------------省市区组件样式-----------
|
|
@@ -585,6 +585,7 @@ function useSingle(inParam) {
|
|
|
585
585
|
var tableTools = useMemo(function () {
|
|
586
586
|
return [(toolConfig === null || toolConfig === void 0 ? void 0 : toolConfig.add) && canAdd ? /*#__PURE__*/React.createElement(_Button, {
|
|
587
587
|
key: "add",
|
|
588
|
+
type: "primary",
|
|
588
589
|
onClick: function onClick() {
|
|
589
590
|
return onAdd(null);
|
|
590
591
|
},
|
package/es/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import AreaCascader from './components/AreaCascader';
|
|
|
9
9
|
import AreaCascaderPanel from './components/AreaCascaderPanel';
|
|
10
10
|
import DescritionCard from './components/DescritionCard';
|
|
11
11
|
import Permission from './components/Permission';
|
|
12
|
+
import GroupTip from './components/GroupTip';
|
|
12
13
|
import BaseService from './service/BaseService';
|
|
13
14
|
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions } from './http';
|
|
14
15
|
import * as utils from './utils';
|
|
@@ -22,4 +23,4 @@ import type { DtlLyaoutProps } from './components/DtlLayout';
|
|
|
22
23
|
import type { DescritionCardProps } from './components/DescritionCard';
|
|
23
24
|
import type { PermissionProps } from './components/Permission';
|
|
24
25
|
export type { ApiResponse, TableToolbar, BaseApiType, MethodType, DtlLyaoutProps, DescritionCardProps, PermissionProps };
|
|
25
|
-
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
|
26
|
+
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, GroupTip, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
package/es/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import AreaCascader from './components/AreaCascader';
|
|
|
9
9
|
import AreaCascaderPanel from './components/AreaCascaderPanel';
|
|
10
10
|
import DescritionCard from './components/DescritionCard';
|
|
11
11
|
import Permission from './components/Permission';
|
|
12
|
+
import GroupTip from './components/GroupTip';
|
|
12
13
|
import BaseService from './service/BaseService';
|
|
13
14
|
import request, { httpGet, httpPut, httpPost, httpDelete, getDict, fetchOptions } from './http';
|
|
14
15
|
import * as utils from './utils';
|
|
@@ -16,4 +17,4 @@ import * as utils from './utils';
|
|
|
16
17
|
import useSingle from './hooks/useSingle';
|
|
17
18
|
import useDtl from './hooks/useDtl';
|
|
18
19
|
import usePermission from './hooks/usePermission';
|
|
19
|
-
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
|
20
|
+
export { DtlLayout, InputTable, Page404, Loading, IconSelector, ImageSelector, InputMultiLine, AreaCascader, AreaCascaderPanel, DescritionCard, Permission, GroupTip, BaseService, request, httpDelete, httpGet, httpPost, httpPut, getDict, fetchOptions, utils, useSingle, useDtl, usePermission };
|
package/es/utils/index.d.ts
CHANGED
|
@@ -98,11 +98,11 @@ export declare const getCache: (key: string, session?: boolean) => string | null
|
|
|
98
98
|
*/
|
|
99
99
|
export declare const clearCache: (key?: string | undefined, session?: boolean) => void;
|
|
100
100
|
/** @name 显示错误 */
|
|
101
|
-
export declare const showError: (text: string) => void;
|
|
101
|
+
export declare const showError: (text: string, duration?: number) => void;
|
|
102
102
|
/** @name 显示警示 */
|
|
103
|
-
export declare const showWarn: (text: string) => void;
|
|
103
|
+
export declare const showWarn: (text: string, duration?: number) => void;
|
|
104
104
|
/** @name 显示成功 */
|
|
105
|
-
export declare const showSuccess: (text: string) => void;
|
|
105
|
+
export declare const showSuccess: (text: string, duration?: number) => void;
|
|
106
106
|
/**
|
|
107
107
|
* 弹框提示
|
|
108
108
|
* @param text 提示信息
|
package/es/utils/index.js
CHANGED
|
@@ -215,8 +215,10 @@ _message.config({
|
|
|
215
215
|
});
|
|
216
216
|
/** @name 显示错误 */
|
|
217
217
|
export var showError = function showError(text) {
|
|
218
|
+
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 4;
|
|
218
219
|
_message.error({
|
|
219
220
|
content: text,
|
|
221
|
+
duration: duration,
|
|
220
222
|
getPopupContainer: function getPopupContainer(e) {
|
|
221
223
|
return getFullScreenElement() || document.body;
|
|
222
224
|
}
|
|
@@ -224,8 +226,10 @@ export var showError = function showError(text) {
|
|
|
224
226
|
};
|
|
225
227
|
/** @name 显示警示 */
|
|
226
228
|
export var showWarn = function showWarn(text) {
|
|
229
|
+
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
|
|
227
230
|
_message.warn({
|
|
228
231
|
content: text,
|
|
232
|
+
duration: duration,
|
|
229
233
|
getPopupContainer: function getPopupContainer(e) {
|
|
230
234
|
return getFullScreenElement() || document.body;
|
|
231
235
|
}
|
|
@@ -233,8 +237,10 @@ export var showWarn = function showWarn(text) {
|
|
|
233
237
|
};
|
|
234
238
|
/** @name 显示成功 */
|
|
235
239
|
export var showSuccess = function showSuccess(text) {
|
|
240
|
+
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;
|
|
236
241
|
_message.success({
|
|
237
242
|
content: text,
|
|
243
|
+
duration: duration,
|
|
238
244
|
getPopupContainer: function getPopupContainer(e) {
|
|
239
245
|
return getFullScreenElement() || document.body;
|
|
240
246
|
}
|
|
@@ -6,15 +6,17 @@ export declare type DtlLyaoutProps = Record<string, any> & {
|
|
|
6
6
|
onExit: (visible?: boolean) => void;
|
|
7
7
|
/** 保存方法 */
|
|
8
8
|
onSave?: () => void;
|
|
9
|
-
/**
|
|
9
|
+
/** 自定义按钮方法,defaultBtn 默认有三个按钮,btnBack=返回,btnSave=保存,btnAudit=审核 */
|
|
10
10
|
renderButton?: (defaultBtn: JSX.Element[]) => JSX.Element[];
|
|
11
11
|
/** 审核方法 */
|
|
12
12
|
onAudit?: () => void;
|
|
13
13
|
/**按钮状态 */
|
|
14
14
|
btnStatus?: (btnKey: string) => boolean | void;
|
|
15
|
-
/**
|
|
15
|
+
/** 保存按钮文本,默认为‘保存’,传入''时不展示 */
|
|
16
16
|
btnSaveText?: string;
|
|
17
|
-
/**
|
|
17
|
+
/** 审核按钮文本,默认为‘审核’,传入''时不展示 */
|
|
18
|
+
btnAuditText?: string;
|
|
19
|
+
/** 返回按钮文本,默认为'返回' */
|
|
18
20
|
btnExitText?: string;
|
|
19
21
|
/** 标题 */
|
|
20
22
|
title?: string;
|
|
@@ -6,6 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
+
require("antd/es/space/style");
|
|
10
|
+
var _space = _interopRequireDefault(require("antd/es/space"));
|
|
9
11
|
require("antd/es/button/style");
|
|
10
12
|
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
11
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -28,6 +30,8 @@ function DtlLayout(props) {
|
|
|
28
30
|
btnSaveText = _props$btnSaveText === void 0 ? '保存' : _props$btnSaveText,
|
|
29
31
|
_props$btnExitText = props.btnExitText,
|
|
30
32
|
btnExitText = _props$btnExitText === void 0 ? '返回' : _props$btnExitText,
|
|
33
|
+
_props$btnAuditText = props.btnAuditText,
|
|
34
|
+
btnAuditText = _props$btnAuditText === void 0 ? '审核' : _props$btnAuditText,
|
|
31
35
|
btnStatus = props.btnStatus,
|
|
32
36
|
statusField = props.statusField,
|
|
33
37
|
auditStatus = props.auditStatus,
|
|
@@ -55,18 +59,17 @@ function DtlLayout(props) {
|
|
|
55
59
|
return isAudit();
|
|
56
60
|
};
|
|
57
61
|
var btns = (0, _react.useMemo)(function () {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var b = [];
|
|
62
|
+
var back = /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
63
|
+
key: "btnBack",
|
|
64
|
+
onClick: function onClick() {
|
|
65
|
+
return props.onExit(false);
|
|
66
|
+
},
|
|
67
|
+
icon: /*#__PURE__*/_react.default.createElement(_icons.ArrowLeftOutlined, null)
|
|
68
|
+
}, btnExitText);
|
|
69
|
+
var btnList = [back];
|
|
67
70
|
// 有新增或更改权限且未审核,开放出保存按钮
|
|
68
|
-
if ((checkRight(2) || checkRight(4)) && !isAudit() && !isView) {
|
|
69
|
-
|
|
71
|
+
if (btnSaveText && (checkRight(2) || checkRight(4)) && !isAudit() && !isView) {
|
|
72
|
+
btnList.unshift( /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
70
73
|
key: "btnSave",
|
|
71
74
|
onClick: function onClick() {
|
|
72
75
|
var _formRef$current;
|
|
@@ -80,8 +83,8 @@ function DtlLayout(props) {
|
|
|
80
83
|
}, btnSaveText));
|
|
81
84
|
}
|
|
82
85
|
// 转入onAudit方法且有审核权限,数据未审核,开放出审核按钮
|
|
83
|
-
if (props.onAudit && checkRight(64) && !isAudit() && !isView) {
|
|
84
|
-
|
|
86
|
+
if (btnAuditText && props.onAudit && checkRight(64) && !isAudit() && !isView) {
|
|
87
|
+
btnList.unshift( /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
85
88
|
key: "btnAudit",
|
|
86
89
|
disabled: btnDisabled('btnAudit'),
|
|
87
90
|
onClick: function onClick() {
|
|
@@ -89,10 +92,16 @@ function DtlLayout(props) {
|
|
|
89
92
|
props.onAudit();
|
|
90
93
|
},
|
|
91
94
|
icon: /*#__PURE__*/_react.default.createElement(_icons.AuditOutlined, null)
|
|
92
|
-
},
|
|
95
|
+
}, btnAuditText));
|
|
93
96
|
}
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
// 如果用户直接返回空,还是需要把返回按钮加上。
|
|
98
|
+
if (props.renderButton) {
|
|
99
|
+
btnList = props.renderButton(btnList);
|
|
100
|
+
if (!btnList || !btnList.length) {
|
|
101
|
+
btnList = [back];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return btnList;
|
|
96
105
|
}, [props]);
|
|
97
106
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
98
107
|
className: "dtl-layout"
|
|
@@ -100,16 +109,12 @@ function DtlLayout(props) {
|
|
|
100
109
|
className: (0, _classnames.default)('dtl-header', headerClass),
|
|
101
110
|
style: headerStyle
|
|
102
111
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
103
|
-
className: "dtl-back"
|
|
104
|
-
}, /*#__PURE__*/_react.default.createElement(_icons.LeftOutlined, {
|
|
105
|
-
onClick: function onClick() {
|
|
106
|
-
return props.onExit(false);
|
|
107
|
-
}
|
|
108
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
109
112
|
className: "dtl-title"
|
|
110
113
|
}, dtlTitle), /*#__PURE__*/_react.default.createElement("div", {
|
|
111
114
|
className: "dtl-btns"
|
|
112
|
-
},
|
|
115
|
+
}, /*#__PURE__*/_react.default.createElement(_space.default, {
|
|
116
|
+
size: 8
|
|
117
|
+
}, btns))), /*#__PURE__*/_react.default.createElement("div", {
|
|
113
118
|
className: (0, _classnames.default)('dtl-body', bodyClass),
|
|
114
119
|
style: bodyStyle
|
|
115
120
|
}, children));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './common.less';
|
|
3
|
+
export declare type GroupTitleProps = {
|
|
4
|
+
text: React.ReactNode | string;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
isInner?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const GroupTip: React.FC<GroupTitleProps>;
|
|
10
|
+
export default GroupTip;
|