ls-pro-common 1.1.4 → 3.0.1
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 +421 -108
- package/dist/common.js +1 -1
- package/dist/common.less +1 -0
- package/dist/common.min.css +421 -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 +157 -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 +157 -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,25 @@
|
|
|
1
1
|
body {
|
|
2
|
-
|
|
3
|
-
--
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
|
|
3
|
+
--bg-color:#F9FAFB;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
--ant-primary-color : #0E55CB;
|
|
7
|
+
--ant-primary-color-hover : #3277d9;
|
|
8
|
+
--ant-primary-color-active : #033ca6;
|
|
9
|
+
--ant-primary-color-outline : rgba(14, 85, 203, 0.2);
|
|
6
10
|
--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(
|
|
11
|
+
--ant-primary-2 : #b5dbff;
|
|
12
|
+
--ant-primary-3 : #85baf2;
|
|
13
|
+
--ant-primary-4 : #5a99e6;
|
|
14
|
+
--ant-primary-5 : #3277d9;
|
|
15
|
+
--ant-primary-6 : #0E55CB;
|
|
16
|
+
--ant-primary-7 : #033ca6;
|
|
17
|
+
--ant-primary-color-deprecated-pure : #94b9f8;
|
|
18
|
+
--ant-primary-color-deprecated-l-35 : #94b9f8;
|
|
19
|
+
--ant-primary-color-deprecated-l-20 : #4c8bf3;
|
|
20
|
+
--ant-primary-color-deprecated-t-20 : #3e77d5;
|
|
21
|
+
--ant-primary-color-deprecated-t-50 : #87aae5;
|
|
22
|
+
--ant-primary-color-deprecated-f-12 : rgba(14, 85, 203, 0.12);
|
|
19
23
|
--ant-primary-color-active-deprecated-f-30: rgba(230, 244, 255, 0.3);
|
|
20
24
|
--ant-primary-color-active-deprecated-d-02: #dcf0ff;
|
|
21
25
|
--ant-success-color : #52c41a;
|
|
@@ -36,9 +40,10 @@ body {
|
|
|
36
40
|
--ant-warning-color-outline : rgba(250, 173, 20, 0.2);
|
|
37
41
|
--ant-warning-color-deprecated-bg : #fffbe6;
|
|
38
42
|
--ant-warning-color-deprecated-border : #ffe58f;
|
|
39
|
-
--ant-info-color : #
|
|
43
|
+
--ant-info-color : #0E55CB;
|
|
40
44
|
--ant-info-color-deprecated-bg : #e6f4ff;
|
|
41
|
-
--ant-info-color-deprecated-border : #
|
|
45
|
+
--ant-info-color-deprecated-border : #85baf2;
|
|
46
|
+
|
|
42
47
|
|
|
43
48
|
// --ant-primary-color : #4997E6;
|
|
44
49
|
// --ant-primary-color-hover : #74b7f2;
|
|
@@ -82,52 +87,72 @@ body {
|
|
|
82
87
|
// --ant-info-color-deprecated-border : #ccebff;
|
|
83
88
|
}
|
|
84
89
|
|
|
90
|
+
* ::-webkit-scrollbar-thumb {
|
|
91
|
+
background-color: rgba(101, 100, 99, 0.5);
|
|
92
|
+
border-radius : 6px;
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
background-color: rgba(101, 100, 99, 0.8);
|
|
96
|
+
border-radius : 6px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
* ::-webkit-scrollbar {
|
|
101
|
+
width : 8px;
|
|
102
|
+
height : 8px;
|
|
103
|
+
background-color: transparent;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
* {
|
|
107
|
+
scrollbar-width: thin;
|
|
108
|
+
}
|
|
109
|
+
|
|
85
110
|
|
|
86
111
|
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);
|
|
112
|
+
--ant-primary-color : #fa8500;
|
|
113
|
+
--ant-primary-color-hover : #ffa229;
|
|
114
|
+
--ant-primary-color-active : #d46a00;
|
|
115
|
+
--ant-primary-color-outline : rgba(250, 133, 0, 0.2);
|
|
116
|
+
--ant-primary-bg : #fff;
|
|
117
|
+
--ant-primary-side : #fff7e6;
|
|
118
|
+
--ant-primary-0 : #ffd9ad;
|
|
119
|
+
--ant-primary-1 : #fff7e6;
|
|
120
|
+
--ant-primary-2 : #ffe0a3;
|
|
121
|
+
--ant-primary-3 : #ffce7a;
|
|
122
|
+
--ant-primary-4 : #ffba52;
|
|
123
|
+
--ant-primary-5 : #ffa229;
|
|
124
|
+
--ant-primary-6 : #fa8500;
|
|
125
|
+
--ant-primary-7 : #d46a00;
|
|
126
|
+
--ant-primary-color-deprecated-pure : #ffd9ad;
|
|
127
|
+
--ant-primary-color-deprecated-l-35 : #ffd9ad;
|
|
128
|
+
--ant-primary-color-deprecated-l-20 : #ffb561;
|
|
129
|
+
--ant-primary-color-deprecated-t-20 : #fb9d33;
|
|
130
|
+
--ant-primary-color-deprecated-t-50 : #fdc280;
|
|
131
|
+
--ant-primary-color-deprecated-f-12 : rgba(250, 133, 0, 0.12);
|
|
107
132
|
--ant-primary-color-active-deprecated-f-30: rgba(255, 247, 230, 0.3);
|
|
108
133
|
--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;
|
|
134
|
+
--ant-success-color : #52c41a;
|
|
135
|
+
--ant-success-color-hover : #73d13d;
|
|
136
|
+
--ant-success-color-active : #389e0d;
|
|
137
|
+
--ant-success-color-outline : rgba(82, 196, 26, 0.2);
|
|
138
|
+
--ant-success-color-deprecated-bg : #f6ffed;
|
|
139
|
+
--ant-success-color-deprecated-border : #b7eb8f;
|
|
140
|
+
--ant-error-color : #ff4d4f;
|
|
141
|
+
--ant-error-color-hover : #ff7875;
|
|
142
|
+
--ant-error-color-active : #d9363e;
|
|
143
|
+
--ant-error-color-outline : rgba(255, 77, 79, 0.2);
|
|
144
|
+
--ant-error-color-deprecated-bg : #fff2f0;
|
|
145
|
+
--ant-error-color-deprecated-border : #ffccc7;
|
|
146
|
+
--ant-warning-color : #faad14;
|
|
147
|
+
--ant-warning-color-hover : #ffc53d;
|
|
148
|
+
--ant-warning-color-active : #d48806;
|
|
149
|
+
--ant-warning-color-outline : rgba(250, 173, 20, 0.2);
|
|
150
|
+
--ant-warning-color-deprecated-bg : #fffbe6;
|
|
151
|
+
--ant-warning-color-deprecated-border : #ffe58f;
|
|
152
|
+
--ant-info-color : #fa8500;
|
|
153
|
+
--ant-info-color-deprecated-bg : #fff7e6;
|
|
154
|
+
--ant-info-color-deprecated-border : #ffce7a;
|
|
155
|
+
--antd-wave-shadow-color : #fa8500;
|
|
131
156
|
|
|
132
157
|
.ant-table-cell,
|
|
133
158
|
.ant-pro-table-alert-info-content {
|
|
@@ -151,44 +176,41 @@ body.theme-yellow {
|
|
|
151
176
|
left : 0;
|
|
152
177
|
right : 0;
|
|
153
178
|
bottom : 0;
|
|
154
|
-
background :
|
|
179
|
+
background : var(--bg-color,#F9FAFB);
|
|
155
180
|
display : flex;
|
|
156
181
|
flex-direction: column;
|
|
157
182
|
z-index : 50;
|
|
158
183
|
|
|
159
184
|
.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
|
-
}
|
|
185
|
+
display : flex;
|
|
186
|
+
justify-items : center;
|
|
187
|
+
padding : 8px 20px;
|
|
188
|
+
background : #fff;
|
|
189
|
+
// border-bottom: 1px solid #f0f0f0;
|
|
190
|
+
|
|
191
|
+
// .dtl-back {
|
|
192
|
+
// display : flex;
|
|
193
|
+
// align-items : center;
|
|
194
|
+
// padding-right: 5px;
|
|
195
|
+
|
|
196
|
+
// >span {
|
|
197
|
+
// padding : 3px;
|
|
198
|
+
// border-radius: 2px;
|
|
199
|
+
|
|
200
|
+
// &:hover {
|
|
201
|
+
// background: var(--ant-primary-2);
|
|
202
|
+
// color : var(--ant-primary-color)
|
|
203
|
+
// }
|
|
204
|
+
// }
|
|
205
|
+
// }
|
|
180
206
|
|
|
181
207
|
.dtl-title {
|
|
182
|
-
font-size:
|
|
208
|
+
font-size: 14px;
|
|
183
209
|
}
|
|
184
210
|
|
|
185
211
|
.dtl-btns {
|
|
186
212
|
flex : 1;
|
|
187
213
|
text-align: right;
|
|
188
|
-
|
|
189
|
-
button+button {
|
|
190
|
-
margin-left: 8px;
|
|
191
|
-
}
|
|
192
214
|
}
|
|
193
215
|
}
|
|
194
216
|
|
|
@@ -196,7 +218,6 @@ body.theme-yellow {
|
|
|
196
218
|
height : 0;
|
|
197
219
|
flex : 1;
|
|
198
220
|
overflow: auto;
|
|
199
|
-
padding : 12px;
|
|
200
221
|
}
|
|
201
222
|
|
|
202
223
|
.dtl-flex {
|
|
@@ -272,33 +293,6 @@ body.theme-yellow {
|
|
|
272
293
|
}
|
|
273
294
|
}
|
|
274
295
|
|
|
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
296
|
|
|
303
297
|
a {
|
|
304
298
|
color: var(--ant-primary-color);
|
|
@@ -399,102 +393,103 @@ a:hover {
|
|
|
399
393
|
}
|
|
400
394
|
|
|
401
395
|
|
|
402
|
-
.
|
|
403
|
-
|
|
404
|
-
|
|
396
|
+
.ls-group-tip {
|
|
397
|
+
display : flex;
|
|
398
|
+
position : relative;
|
|
399
|
+
width : 100%;
|
|
400
|
+
align-items : center;
|
|
401
|
+
background : #fff;
|
|
402
|
+
padding-bottom: 12px;
|
|
403
|
+
.ls-group-divider {
|
|
404
|
+
height : 14px;
|
|
405
|
+
border-right: 2px solid var(--ant-primary-color);
|
|
405
406
|
}
|
|
406
|
-
}
|
|
407
407
|
|
|
408
|
-
.
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
408
|
+
.ls-group-text {
|
|
409
|
+
font-size : 14px;
|
|
410
|
+
color : #181818;
|
|
411
|
+
padding-left: 8px;
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
.ant-row {
|
|
416
|
-
width: 100%;
|
|
417
|
-
}
|
|
418
415
|
|
|
419
|
-
|
|
420
|
-
max-width: min-content !important;
|
|
421
|
-
}
|
|
416
|
+
|
|
422
417
|
//-------------------省市区组件样式-----------
|
|
423
418
|
//最外层盒子
|
|
424
419
|
.ls-area-cascaded-box {
|
|
425
|
-
width: 600px;
|
|
426
|
-
display: flex;
|
|
420
|
+
width : 600px;
|
|
421
|
+
display : flex;
|
|
427
422
|
flex-direction: column;
|
|
428
|
-
transition: all 0.3s;
|
|
423
|
+
transition : all 0.3s;
|
|
429
424
|
|
|
430
425
|
.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;
|
|
426
|
+
width : 100%;
|
|
427
|
+
padding : 2px 0 6px;
|
|
428
|
+
border-bottom : 1px solid #f0f0f0;
|
|
429
|
+
display : flex;
|
|
430
|
+
flex-direction : row;
|
|
436
431
|
justify-content: space-around;
|
|
437
432
|
justify-content: center;
|
|
438
433
|
|
|
439
434
|
.ls-word-box-display {
|
|
440
|
-
margin: 0 10px;
|
|
441
|
-
font-size: 14px;
|
|
435
|
+
margin : 0 10px;
|
|
436
|
+
font-size : 14px;
|
|
442
437
|
font-weight: 100;
|
|
443
438
|
|
|
444
439
|
button {
|
|
445
|
-
border: none;
|
|
440
|
+
border : none;
|
|
446
441
|
background-color: var(--ant-primary-2, #f0f9ff);
|
|
447
442
|
|
|
448
443
|
&[disabled] {
|
|
449
444
|
background-color: #fafafa !important;
|
|
450
445
|
|
|
451
446
|
.ls-myself-select-title-style {
|
|
452
|
-
color: var(--ant-primary-4, #a3d7ff);
|
|
447
|
+
color : var(--ant-primary-4, #a3d7ff);
|
|
453
448
|
transition: all 0.3s;
|
|
454
449
|
}
|
|
455
450
|
}
|
|
456
451
|
}
|
|
457
452
|
|
|
458
453
|
.ls-myself-select-title-style {
|
|
459
|
-
color: var(--ant-primary-color, rgb(69, 154, 220));
|
|
460
|
-
font-size: 14px;
|
|
454
|
+
color : var(--ant-primary-color, rgb(69, 154, 220));
|
|
455
|
+
font-size : 14px;
|
|
461
456
|
font-weight: 600;
|
|
462
|
-
transition: all 0.3s;
|
|
457
|
+
transition : all 0.3s;
|
|
463
458
|
}
|
|
464
459
|
}
|
|
465
460
|
|
|
466
461
|
.ls-icon-box-display {
|
|
467
|
-
display: flex;
|
|
462
|
+
display : flex;
|
|
468
463
|
align-items: center;
|
|
469
464
|
}
|
|
470
465
|
}
|
|
471
466
|
|
|
472
467
|
.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;
|
|
468
|
+
width : 100%;
|
|
469
|
+
min-height : 100px;
|
|
470
|
+
max-height : 350px;
|
|
471
|
+
overflow : auto;
|
|
472
|
+
padding : 8px 12px 4px;
|
|
473
|
+
display : grid;
|
|
479
474
|
grid-template-columns: repeat(4, 1fr);
|
|
480
|
-
gap: 4px;
|
|
481
|
-
justify-content: start;
|
|
482
|
-
align-content: flex-start;
|
|
483
|
-
align-items: center;
|
|
475
|
+
gap : 4px;
|
|
476
|
+
justify-content : start;
|
|
477
|
+
align-content : flex-start;
|
|
478
|
+
align-items : center;
|
|
484
479
|
|
|
485
480
|
.ls-area-cascaded-span {
|
|
486
481
|
text-align: center;
|
|
487
|
-
padding: 6px 10px;
|
|
482
|
+
padding : 6px 10px;
|
|
488
483
|
|
|
489
484
|
//文字不换行,超出省略
|
|
490
|
-
overflow: hidden;
|
|
485
|
+
overflow : hidden;
|
|
491
486
|
text-overflow: ellipsis;
|
|
492
|
-
white-space: nowrap;
|
|
493
|
-
cursor: pointer;
|
|
487
|
+
white-space : nowrap;
|
|
488
|
+
cursor : pointer;
|
|
494
489
|
|
|
495
490
|
&.ls-area-selected,
|
|
496
491
|
&:hover {
|
|
497
|
-
color: var(--ant-primary-color, rgb(69, 154, 220));
|
|
492
|
+
color : var(--ant-primary-color, rgb(69, 154, 220));
|
|
498
493
|
transition: all 0.3s;
|
|
499
494
|
}
|
|
500
495
|
}
|
|
@@ -508,4 +503,7 @@ a:hover {
|
|
|
508
503
|
}
|
|
509
504
|
}
|
|
510
505
|
|
|
506
|
+
|
|
507
|
+
@import url('./antd-custom.less');
|
|
508
|
+
|
|
511
509
|
//-------------------省市区组件样式-----------
|
|
@@ -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;
|