@vue-ui-kit/ant 2.4.1 → 2.4.3
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/README.md +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/declarations/antProxy.d.ts +1 -1
- package/dist/es/index.js +10999 -12163
- package/dist/index.d.ts +2 -2
- package/dist/packages/components/CollapseCard.vue.d.ts +29 -0
- package/dist/packages/components/PCanvasTable.vue.d.ts +177 -0
- package/dist/packages/components/PForm.vue.d.ts +22 -0
- package/dist/packages/components/PFormCol.vue.d.ts +23 -0
- package/dist/packages/components/PFormGroup.vue.d.ts +38 -0
- package/dist/packages/components/PGroupBlock.vue.d.ts +16 -0
- package/dist/packages/components/PromisePicker.vue.d.ts +25 -0
- package/dist/packages/components/RenderAntCell.d.ts +27 -9
- package/dist/packages/components/RenderDefaultSlots.d.ts +33 -13
- package/dist/packages/components/RenderEditCell.d.ts +22 -7
- package/dist/packages/components/RenderItemSlots.d.ts +24 -11
- package/dist/packages/components/RenderTitleSlots.d.ts +15 -5
- package/dist/packages/renders/TableInput.vue.d.ts +25 -0
- package/dist/packages/utils/config.d.ts +8 -0
- package/dist/style.css +419 -1
- package/dist/style.scss +22 -1
- package/package.json +10 -9
- package/src/declarations/antProxy.ts +9 -5
- package/src/index.ts +15 -2
- package/src/packages/components/PFormCol.vue +30 -14
- package/src/packages/components/PGrid.vue +134 -95
- package/src/packages/components/RenderAntCell.tsx +29 -29
- package/src/packages/styles/index.scss +22 -1
- package/src/packages/utils/config.ts +105 -92
package/dist/style.css
CHANGED
|
@@ -1 +1,419 @@
|
|
|
1
|
-
@charset "UTF-8"
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
.p-pane {
|
|
3
|
+
background-color: var(--p-theme-bg, #fff);
|
|
4
|
+
padding: 16px;
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.text-slate-5 {
|
|
9
|
+
color: #64748b;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* #region patch for env without unocss/tailwind/windicss */
|
|
13
|
+
.w-full {
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cursor-pointer {
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.py-4x {
|
|
22
|
+
padding-top: 4px;
|
|
23
|
+
padding-bottom: 4px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.px-2x {
|
|
27
|
+
padding-left: 2px;
|
|
28
|
+
padding-right: 2px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.pl-4x {
|
|
32
|
+
padding-left: 1em;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.pl-8 {
|
|
36
|
+
padding-left: 2em;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.h-0 {
|
|
40
|
+
height: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.h-full {
|
|
44
|
+
height: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.flex {
|
|
48
|
+
display: flex;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.flex-col {
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.flex-1 {
|
|
56
|
+
flex: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.items-center {
|
|
60
|
+
align-items: center;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.justify-between {
|
|
64
|
+
justify-content: space-between;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.gap-4px {
|
|
68
|
+
gap: 4px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.gap-8px {
|
|
72
|
+
gap: 8px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.gap-12px {
|
|
76
|
+
gap: 12px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.flex-shrink-0 {
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.min-w-0 {
|
|
84
|
+
min-width: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.min-h-0 {
|
|
88
|
+
min-height: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.pt-8px {
|
|
92
|
+
padding-top: 8px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.px-16px {
|
|
96
|
+
padding-left: 16px;
|
|
97
|
+
padding-right: 16px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.mt-4px {
|
|
101
|
+
margin-top: 4px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.text-right {
|
|
105
|
+
text-align: right;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.overflow-y-auto {
|
|
109
|
+
overflow-y: auto;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.overflow-hidden {
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* #endregion */
|
|
117
|
+
/* #region P family styles */
|
|
118
|
+
.p-theme-bg {
|
|
119
|
+
background-color: var(--p-theme-bg, #fff);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.p-wrapper .p-form-wrapper {
|
|
123
|
+
z-index: 4;
|
|
124
|
+
}
|
|
125
|
+
.p-wrapper .p-canvas-pagination.ant-pagination {
|
|
126
|
+
padding: 16px 0;
|
|
127
|
+
}
|
|
128
|
+
.p-wrapper .p-error-hang-out .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper {
|
|
129
|
+
border-color: var(--p-border-color, #d9d9d9) !important;
|
|
130
|
+
}
|
|
131
|
+
.p-wrapper .p-error-hang-out .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus {
|
|
132
|
+
border-color: var(--p-primary-color, #4096ff) !important;
|
|
133
|
+
}
|
|
134
|
+
.p-wrapper .p-error-hang-out .ant-form-item-explain-error {
|
|
135
|
+
opacity: 0 !important;
|
|
136
|
+
transform: translateY(-10px) !important;
|
|
137
|
+
max-height: 0 !important;
|
|
138
|
+
overflow: hidden !important;
|
|
139
|
+
transition: none !important;
|
|
140
|
+
}
|
|
141
|
+
.p-wrapper .ant-form-item-explain-error {
|
|
142
|
+
opacity: 0;
|
|
143
|
+
transform: translateY(-10px);
|
|
144
|
+
max-height: 0;
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
transition: opacity 0.3s ease-out 0.3s, transform 0.3s ease-out 0.3s, max-height 0.3s ease-out 0.3s;
|
|
147
|
+
}
|
|
148
|
+
.p-wrapper .ant-form-item-has-error .ant-form-item-explain-error {
|
|
149
|
+
opacity: 1;
|
|
150
|
+
transform: translateY(0);
|
|
151
|
+
max-height: 100px;
|
|
152
|
+
}
|
|
153
|
+
.p-wrapper .p-toolbar-wrapper {
|
|
154
|
+
box-shadow: 0 8px var(--p-bg-color, #fff);
|
|
155
|
+
border-radius: 0.5em 0.5em 0 0;
|
|
156
|
+
margin-bottom: -0.5em;
|
|
157
|
+
}
|
|
158
|
+
.p-wrapper .p-canvas-toolbar-wrapper {
|
|
159
|
+
box-shadow: 0 8px var(--p-bg-color, #fff);
|
|
160
|
+
border-radius: 0.5em 0.5em 0 0;
|
|
161
|
+
}
|
|
162
|
+
.p-wrapper .ant-form .ant-form-item {
|
|
163
|
+
margin-bottom: 0;
|
|
164
|
+
}
|
|
165
|
+
.p-wrapper .ant-form .ant-form-item.p-required .ant-form-item-label > label:before {
|
|
166
|
+
display: inline-block;
|
|
167
|
+
margin-inline-end: 4px;
|
|
168
|
+
color: var(--p-danger-color, #ff4d4f);
|
|
169
|
+
font-size: 14px;
|
|
170
|
+
font-family: SimSun, sans-serif;
|
|
171
|
+
line-height: 1;
|
|
172
|
+
content: "*";
|
|
173
|
+
}
|
|
174
|
+
.p-wrapper .ant-form .ant-form-item .ant-form-item-label {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: start;
|
|
177
|
+
justify-content: flex-end;
|
|
178
|
+
}
|
|
179
|
+
.p-wrapper .ant-form .ant-form-item .ant-form-item-label > label {
|
|
180
|
+
white-space: break-spaces;
|
|
181
|
+
align-items: flex-start;
|
|
182
|
+
height: fit-content;
|
|
183
|
+
padding-top: 0.36em;
|
|
184
|
+
}
|
|
185
|
+
.p-wrapper .ant-form .ant-form-item .ant-form-item-label > label:after {
|
|
186
|
+
padding-left: 4px;
|
|
187
|
+
margin-inline-start: unset;
|
|
188
|
+
}
|
|
189
|
+
.p-wrapper .ant-form.ant-form-vertical .ant-form-item .ant-form-item-label {
|
|
190
|
+
justify-content: flex-start;
|
|
191
|
+
font-weight: 600;
|
|
192
|
+
}
|
|
193
|
+
.p-wrapper .ant-table-wrapper .ant-table {
|
|
194
|
+
background-color: var(--p-table-row-bg-color, #fff);
|
|
195
|
+
}
|
|
196
|
+
.p-wrapper .ant-table-wrapper .ant-table td.ant-table-cell {
|
|
197
|
+
background-color: var(--p-table-row-bg-color, #fff);
|
|
198
|
+
}
|
|
199
|
+
.p-wrapper .ant-table-wrapper .ant-table-tbody > tr > td.ant-table-cell-row-hover {
|
|
200
|
+
background-color: var(--p-table-row-hover-bg-color, #e6e7ea);
|
|
201
|
+
}
|
|
202
|
+
.p-wrapper .ant-table-wrapper .ant-table-pagination.ant-pagination {
|
|
203
|
+
margin: unset;
|
|
204
|
+
padding: 16px 0;
|
|
205
|
+
}
|
|
206
|
+
.p-wrapper .ant-table-wrapper tr.p-grid-row-striped {
|
|
207
|
+
background-color: var(--p-striped-bg-color, #f2f3f6);
|
|
208
|
+
}
|
|
209
|
+
.p-wrapper .ant-table-wrapper tr.p-grid-row-striped > td.ant-table-cell {
|
|
210
|
+
background-color: var(--p-striped-bg-color, #e6e7ea);
|
|
211
|
+
}
|
|
212
|
+
.p-wrapper .ant-table-wrapper tr.p-grid-row-striped > td.ant-table-cell.ant-table-cell-row-hover {
|
|
213
|
+
background-color: var(--p-table-row-hover-bg-color, #e6e7ea);
|
|
214
|
+
}
|
|
215
|
+
.p-wrapper .ant-table-wrapper .ant-table-thead > tr > th {
|
|
216
|
+
background-color: var(--p-table-thead-bg-color, #f2f3f6);
|
|
217
|
+
}
|
|
218
|
+
.p-wrapper .ant-table-sticky-scroll {
|
|
219
|
+
visibility: hidden;
|
|
220
|
+
}
|
|
221
|
+
.p-wrapper .ant-table-header.ant-table-sticky-holder:before {
|
|
222
|
+
content: "";
|
|
223
|
+
width: 100%;
|
|
224
|
+
position: absolute;
|
|
225
|
+
height: 22px;
|
|
226
|
+
display: block;
|
|
227
|
+
backdrop-filter: blur(2px);
|
|
228
|
+
top: -16px;
|
|
229
|
+
}
|
|
230
|
+
.p-wrapper .ant-table-wrapper .ant-pagination {
|
|
231
|
+
gap: 8px;
|
|
232
|
+
}
|
|
233
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-prev,
|
|
234
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-next {
|
|
235
|
+
border: 1px solid var(--p-pagination-border-color, #bbbdbf);
|
|
236
|
+
}
|
|
237
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-total-text {
|
|
238
|
+
margin-inline-end: 0;
|
|
239
|
+
padding-inline-end: 8px;
|
|
240
|
+
}
|
|
241
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-item {
|
|
242
|
+
border: 1px solid var(--p-pagination-border-color, transparent);
|
|
243
|
+
}
|
|
244
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-item:not(.ant-pagination-item-active) {
|
|
245
|
+
background-color: var(--p-pagination-bg-color, #fff);
|
|
246
|
+
}
|
|
247
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-item:not(.ant-pagination-item-active) > a {
|
|
248
|
+
color: var(--p-pagination-color, #323335);
|
|
249
|
+
}
|
|
250
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-item:not(.ant-pagination-item-active):hover {
|
|
251
|
+
background-color: var(--p-pagination-hover-bg-color, rgba(0, 0, 0, 0.0588235294));
|
|
252
|
+
}
|
|
253
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-item:not(.ant-pagination-item-active):hover > a {
|
|
254
|
+
color: var(--p-pagination-active-color, rgba(0, 0, 0, 0.8784313725));
|
|
255
|
+
}
|
|
256
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-item.ant-pagination-item-active {
|
|
257
|
+
background-color: var(--p-pagination-active-bg-color, #fff);
|
|
258
|
+
border-color: var(--p-pagination-active-border-color, var(--p-primary-color, #4096ff));
|
|
259
|
+
}
|
|
260
|
+
.p-wrapper .ant-table-wrapper .ant-pagination .ant-pagination-item.ant-pagination-item-active > a {
|
|
261
|
+
color: var(--p-pagination-active-color, var(--p-primary-color, #4096ff));
|
|
262
|
+
}
|
|
263
|
+
.p-wrapper .h-lack .ant-table-wrapper .ant-table-pagination.ant-pagination {
|
|
264
|
+
padding: unset;
|
|
265
|
+
margin-top: 8px;
|
|
266
|
+
}
|
|
267
|
+
.p-wrapper .p-inner-scroll > .ant-table-wrapper, .p-wrapper .p-inner-scroll > .p-grid-table-body > .ant-table-wrapper {
|
|
268
|
+
height: 100%;
|
|
269
|
+
}
|
|
270
|
+
.p-wrapper .p-inner-scroll > .ant-table-wrapper > .ant-spin-nested-loading, .p-wrapper .p-inner-scroll > .p-grid-table-body > .ant-table-wrapper > .ant-spin-nested-loading {
|
|
271
|
+
height: 100%;
|
|
272
|
+
}
|
|
273
|
+
.p-wrapper .p-inner-scroll > .ant-table-wrapper > .ant-spin-nested-loading > .ant-spin-container, .p-wrapper .p-inner-scroll > .p-grid-table-body > .ant-table-wrapper > .ant-spin-nested-loading > .ant-spin-container {
|
|
274
|
+
height: 100%;
|
|
275
|
+
display: flex;
|
|
276
|
+
flex-direction: column;
|
|
277
|
+
}
|
|
278
|
+
.p-wrapper .p-inner-scroll > .ant-table-wrapper > .ant-spin-nested-loading > .ant-spin-container > .ant-table, .p-wrapper .p-inner-scroll > .p-grid-table-body > .ant-table-wrapper > .ant-spin-nested-loading > .ant-spin-container > .ant-table {
|
|
279
|
+
flex: 1;
|
|
280
|
+
height: 0;
|
|
281
|
+
overflow-y: hidden;
|
|
282
|
+
/*border-radius: unset; 修复模糊问题 according to https://stackoverflow.com/questions/49349337/chrome-text-blur-with-overflow-yscroll-and-fixed-height*/
|
|
283
|
+
border-radius: unset;
|
|
284
|
+
}
|
|
285
|
+
.p-wrapper .p-inner-scroll > .ant-table-wrapper > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body, .p-wrapper .p-inner-scroll > .p-grid-table-body > .ant-table-wrapper > .ant-spin-nested-loading > .ant-spin-container > .ant-table > .ant-table-container > .ant-table-body {
|
|
286
|
+
position: relative;
|
|
287
|
+
}
|
|
288
|
+
.p-wrapper .ant-pagination-options .ant-select {
|
|
289
|
+
width: 100px;
|
|
290
|
+
}
|
|
291
|
+
.p-wrapper .ant-table-cell:not(.normal-break) {
|
|
292
|
+
word-break: break-all;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.p-error-group-tab {
|
|
296
|
+
position: relative;
|
|
297
|
+
overflow: visible;
|
|
298
|
+
color: var(--p-danger-color, #f5222d) !important;
|
|
299
|
+
}
|
|
300
|
+
.p-error-group-tab:after {
|
|
301
|
+
content: "🏷️";
|
|
302
|
+
position: absolute;
|
|
303
|
+
top: -1em;
|
|
304
|
+
right: 0;
|
|
305
|
+
width: 1em;
|
|
306
|
+
height: 1em;
|
|
307
|
+
font-size: 0.8em;
|
|
308
|
+
animation: heartbeat 2s infinite;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.ant-picker-dropdown .ant-picker-footer {
|
|
312
|
+
padding-left: 4px;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.p-error-hang-out .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper {
|
|
316
|
+
border-color: var(--p-border-color, #d9d9d9) !important;
|
|
317
|
+
}
|
|
318
|
+
.p-error-hang-out .ant-input-affix-wrapper-status-error:not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus {
|
|
319
|
+
border-color: var(--p-primary-color, #4096ff) !important;
|
|
320
|
+
}
|
|
321
|
+
.p-error-hang-out .ant-form-item-explain-error {
|
|
322
|
+
display: none;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.no-error-border {
|
|
326
|
+
border-color: var(--p-border-color, #d9d9d9) !important;
|
|
327
|
+
}
|
|
328
|
+
.no-error-border:focus {
|
|
329
|
+
border-color: var(--p-primary-color, #4096ff) !important;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
@media (max-width: 575px) {
|
|
333
|
+
.p-wrapper .ant-form .ant-form-item .ant-form-item-label {
|
|
334
|
+
justify-content: flex-start;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
.collapsible-card {
|
|
338
|
+
background-color: var(--p-bg-color, #fff);
|
|
339
|
+
border-color: var(--p-border-light-color, #f0f0f0);
|
|
340
|
+
}
|
|
341
|
+
.collapsible-card .ant-collapse-header {
|
|
342
|
+
padding: 0 12px;
|
|
343
|
+
min-height: 38px;
|
|
344
|
+
display: flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
font-weight: 600;
|
|
347
|
+
}
|
|
348
|
+
.collapsible-card .ant-collapse-content {
|
|
349
|
+
border-color: var(--p-border-light-color, #f0f0f0);
|
|
350
|
+
}
|
|
351
|
+
.collapsible-card .ant-collapse-content .ant-collapse-content-box {
|
|
352
|
+
padding: var(--collapsible-card-body-padding, 12px);
|
|
353
|
+
}
|
|
354
|
+
.collapsible-card .ant-collapse-item {
|
|
355
|
+
border-color: var(--p-border-light-color, #f0f0f0);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/* #endregion */
|
|
359
|
+
/* #region EVirtTable */
|
|
360
|
+
.canvas-cell {
|
|
361
|
+
display: flex;
|
|
362
|
+
flex-direction: column;
|
|
363
|
+
justify-content: center;
|
|
364
|
+
align-items: start;
|
|
365
|
+
padding: 0 8px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* #endregion */
|
|
369
|
+
/**/
|
|
370
|
+
.p-content-align-right.ant-form-item .ant-form-item-control-input-content {
|
|
371
|
+
display: flex;
|
|
372
|
+
justify-content: flex-end;
|
|
373
|
+
align-items: center;
|
|
374
|
+
text-align: right;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**/
|
|
378
|
+
.p-content-align-center.ant-form-item .ant-form-item-control-input-content {
|
|
379
|
+
display: flex;
|
|
380
|
+
justify-content: center;
|
|
381
|
+
align-items: center;
|
|
382
|
+
text-align: center;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
@keyframes heartbeat {
|
|
386
|
+
0% {
|
|
387
|
+
transform: scale(1);
|
|
388
|
+
}
|
|
389
|
+
6% {
|
|
390
|
+
transform: scale(1.22);
|
|
391
|
+
}
|
|
392
|
+
12% {
|
|
393
|
+
transform: scale(1);
|
|
394
|
+
}
|
|
395
|
+
18% {
|
|
396
|
+
transform: scale(1.18);
|
|
397
|
+
}
|
|
398
|
+
24% {
|
|
399
|
+
transform: scale(1);
|
|
400
|
+
}
|
|
401
|
+
48% {
|
|
402
|
+
transform: scale(1);
|
|
403
|
+
}
|
|
404
|
+
54% {
|
|
405
|
+
transform: scale(1.22);
|
|
406
|
+
}
|
|
407
|
+
60% {
|
|
408
|
+
transform: scale(1);
|
|
409
|
+
}
|
|
410
|
+
66% {
|
|
411
|
+
transform: scale(1.18);
|
|
412
|
+
}
|
|
413
|
+
72% {
|
|
414
|
+
transform: scale(1);
|
|
415
|
+
}
|
|
416
|
+
100% {
|
|
417
|
+
transform: scale(1);
|
|
418
|
+
}
|
|
419
|
+
}
|
package/dist/style.scss
CHANGED
|
@@ -67,6 +67,22 @@
|
|
|
67
67
|
gap: 8px;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
.gap-12px {
|
|
71
|
+
gap: 12px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.flex-shrink-0 {
|
|
75
|
+
flex-shrink: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.min-w-0 {
|
|
79
|
+
min-width: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.min-h-0 {
|
|
83
|
+
min-height: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
70
86
|
.pt-8px {
|
|
71
87
|
padding-top: 8px;
|
|
72
88
|
}
|
|
@@ -88,6 +104,10 @@
|
|
|
88
104
|
overflow-y: auto;
|
|
89
105
|
}
|
|
90
106
|
|
|
107
|
+
.overflow-hidden {
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
}
|
|
110
|
+
|
|
91
111
|
/* #endregion */
|
|
92
112
|
|
|
93
113
|
/* #region P family styles */
|
|
@@ -273,7 +293,8 @@
|
|
|
273
293
|
}
|
|
274
294
|
}
|
|
275
295
|
.p-inner-scroll {
|
|
276
|
-
& > .ant-table-wrapper
|
|
296
|
+
& > .ant-table-wrapper,
|
|
297
|
+
& > .p-grid-table-body > .ant-table-wrapper {
|
|
277
298
|
height: 100%;
|
|
278
299
|
|
|
279
300
|
& > .ant-spin-nested-loading {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-ui-kit/ant",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Vue3 UI Kit based on Ant Design",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
30
|
"dev": "vue-tsc --noEmit --skipLibCheck & vite",
|
|
31
|
-
"build": "ts-patch install && vite build",
|
|
32
|
-
"prepack": "rimraf dist &&
|
|
31
|
+
"build": "ts-patch install && vite build && sass src/packages/styles/index.scss dist/style.css --no-source-map",
|
|
32
|
+
"prepack": "rimraf dist && pnpm build",
|
|
33
33
|
"prepare": "husky",
|
|
34
34
|
"lint:lint-staged": "lint-staged",
|
|
35
35
|
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\""
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
},
|
|
58
58
|
"license": "GPL",
|
|
59
59
|
"engines": {
|
|
60
|
-
"node": ">=
|
|
60
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@ant-design/icons-vue": ">=7.0.0",
|
|
64
64
|
"@commitlint/cli": "^19.4.1",
|
|
65
65
|
"@commitlint/config-conventional": "^19.4.1",
|
|
66
66
|
"@types/uuid": "^10.0.0",
|
|
67
|
-
"@vitejs/plugin-vue": "^
|
|
68
|
-
"@vitejs/plugin-vue-jsx": "^
|
|
67
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
68
|
+
"@vitejs/plugin-vue-jsx": "^5.1.5",
|
|
69
69
|
"ant-design-vue": "^4.2.3",
|
|
70
|
-
"esbuild": "^0.
|
|
70
|
+
"esbuild": "^0.28.0",
|
|
71
71
|
"husky": "^9.1.5",
|
|
72
72
|
"lint-staged": "^15.2.9",
|
|
73
73
|
"prettier": "^3.3.3",
|
|
@@ -75,8 +75,9 @@
|
|
|
75
75
|
"sass": "^1.77.8",
|
|
76
76
|
"ts-patch": "^3.2.1",
|
|
77
77
|
"typescript-transform-paths": "^3.5.0",
|
|
78
|
-
"vite": "^
|
|
79
|
-
"vite-plugin-dts": "^5.
|
|
78
|
+
"vite": "^8.0.8",
|
|
79
|
+
"vite-plugin-dts": "^4.5.4",
|
|
80
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
80
81
|
"vue": "^3.4.38"
|
|
81
82
|
}
|
|
82
83
|
}
|
|
@@ -144,8 +144,10 @@ export interface PFormGroupProps<F extends Recordable = Recordable> {
|
|
|
144
144
|
menuHandler?: GroupMenuItemHandler<F>;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
export interface ColumnProps<D extends Recordable = Recordable>
|
|
148
|
-
|
|
147
|
+
export interface ColumnProps<D extends Recordable = Recordable> extends Omit<
|
|
148
|
+
TableColumnType,
|
|
149
|
+
'slots'
|
|
150
|
+
> {
|
|
149
151
|
field?: string;
|
|
150
152
|
children?: ColumnProps<D>[];
|
|
151
153
|
formatter?:
|
|
@@ -232,7 +234,7 @@ export type PGridProps<D extends Recordable = Recordable, F extends Recordable =
|
|
|
232
234
|
// 重置后不自动提交
|
|
233
235
|
lazyReset?: boolean;
|
|
234
236
|
/**
|
|
235
|
-
*
|
|
237
|
+
* 表格纵向滚动区额外预留像素:在 `tableWrapper` 高度内扣减表头、底栏后,再从 body 可滚动高度中减去本值,避免末行与滚动条贴边或被裁切。可通过 `setUIKitConfig({ grid: { fitHeight } })` 或组件 `fitHeight` 按项目微调;库内全局默认见 `config`。
|
|
236
238
|
*/
|
|
237
239
|
fitHeight?: number;
|
|
238
240
|
/**
|
|
@@ -299,8 +301,10 @@ export interface RenderTableParams<D extends Recordable = Recordable> {
|
|
|
299
301
|
field?: string;
|
|
300
302
|
title?: string;
|
|
301
303
|
}
|
|
302
|
-
export interface CanvasColumnProps<T extends Recordable = Recordable>
|
|
303
|
-
|
|
304
|
+
export interface CanvasColumnProps<T extends Recordable = Recordable> extends Omit<
|
|
305
|
+
EVirtColumn,
|
|
306
|
+
'children' | 'formatter' | 'key'
|
|
307
|
+
> {
|
|
304
308
|
key?: string;
|
|
305
309
|
field?: string;
|
|
306
310
|
children?: CanvasColumnProps<T>[];
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,13 @@ import PGroupBlock from '@/components/PGroupBlock.vue';
|
|
|
8
8
|
import PromisePicker from '@/components/PromisePicker.vue';
|
|
9
9
|
import { addFormatter } from '@/utils/AFormatters';
|
|
10
10
|
import { addRender } from '@/store/renderStore';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
setUIKitConfig,
|
|
13
|
+
getUIKitConfig,
|
|
14
|
+
resetUIKitConfig,
|
|
15
|
+
getTooltipRenderer,
|
|
16
|
+
UIKitConfig,
|
|
17
|
+
} from '@/utils/config';
|
|
12
18
|
|
|
13
19
|
// 创建setup方法
|
|
14
20
|
function setup(config?: Partial<UIKitConfig>) {
|
|
@@ -37,7 +43,14 @@ export * from '#/antProxy';
|
|
|
37
43
|
export * from '@/utils/core';
|
|
38
44
|
|
|
39
45
|
// 导出配置方法
|
|
40
|
-
export {
|
|
46
|
+
export {
|
|
47
|
+
setup,
|
|
48
|
+
setUIKitConfig,
|
|
49
|
+
getUIKitConfig,
|
|
50
|
+
resetUIKitConfig,
|
|
51
|
+
getTooltipRenderer,
|
|
52
|
+
type UIKitConfig,
|
|
53
|
+
};
|
|
41
54
|
|
|
42
55
|
// 直接导出组件,使用户可以直接导入使用
|
|
43
56
|
export {
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
import RenderAntItem from '@/components/RenderAntItem';
|
|
5
5
|
import RenderItemSlots from '@/components/RenderItemSlots';
|
|
6
6
|
import { InfoCircleOutlined } from '@ant-design/icons-vue';
|
|
7
|
+
import { Tooltip as ATooltip } from 'ant-design-vue';
|
|
7
8
|
import { v4 as uuid_v4 } from 'uuid';
|
|
8
|
-
import { ref } from 'vue';
|
|
9
|
+
import { ref, computed, h } from 'vue';
|
|
9
10
|
import { isEqual, debounce, isFunction, omit } from 'xe-utils';
|
|
11
|
+
import { getTooltipRenderer } from '@/utils/config';
|
|
10
12
|
|
|
11
13
|
const props = defineProps<{
|
|
12
14
|
item: PFormItemProps<T>;
|
|
@@ -36,6 +38,31 @@
|
|
|
36
38
|
renderFormKey.value = uuid_v4();
|
|
37
39
|
};
|
|
38
40
|
const debounceRefreshCol = debounce(refreshCol, 100);
|
|
41
|
+
|
|
42
|
+
// 将 tooltipConfig 统一渲染为函数式组件,支持全局 renderTooltip 替换
|
|
43
|
+
const tooltipNode = computed<(() => any) | null>(() => {
|
|
44
|
+
if (!props.item.tooltipConfig) return null;
|
|
45
|
+
const config = props.item.tooltipConfig;
|
|
46
|
+
const renderTooltip = getTooltipRenderer();
|
|
47
|
+
const defaultSlot = () => h(InfoCircleOutlined, { class: 'cursor-pointer py-4 px-2' });
|
|
48
|
+
const content: string | (() => any) = isFunction(config.title)
|
|
49
|
+
? config.title
|
|
50
|
+
: String(config.title ?? '');
|
|
51
|
+
|
|
52
|
+
if (renderTooltip) {
|
|
53
|
+
return () => renderTooltip(defaultSlot, content);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// 默认使用 a-tooltip
|
|
57
|
+
return () =>
|
|
58
|
+
isFunction(config.title)
|
|
59
|
+
? h(ATooltip, omit(config, ['title']) as any, {
|
|
60
|
+
default: defaultSlot,
|
|
61
|
+
title: () => h('div', { innerHTML: config.title!() }),
|
|
62
|
+
})
|
|
63
|
+
: h(ATooltip, config as any, { default: defaultSlot });
|
|
64
|
+
});
|
|
65
|
+
|
|
39
66
|
watchPreviousDeep(
|
|
40
67
|
() => props.item,
|
|
41
68
|
(cur, old) => {
|
|
@@ -96,19 +123,8 @@
|
|
|
96
123
|
@trigger="handleTrigger"
|
|
97
124
|
/>
|
|
98
125
|
<span v-else />
|
|
99
|
-
<template v-if="
|
|
100
|
-
<
|
|
101
|
-
v-if="isFunction(item.tooltipConfig.title)"
|
|
102
|
-
v-bind="omit(item.tooltipConfig, ['title'])"
|
|
103
|
-
>
|
|
104
|
-
<info-circle-outlined class="cursor-pointer py-4 px-2" />
|
|
105
|
-
<template #title>
|
|
106
|
-
<div v-html="item.tooltipConfig.title()" />
|
|
107
|
-
</template>
|
|
108
|
-
</a-tooltip>
|
|
109
|
-
<a-tooltip v-else v-bind="item.tooltipConfig">
|
|
110
|
-
<info-circle-outlined class="cursor-pointer py-4 px-2" />
|
|
111
|
-
</a-tooltip>
|
|
126
|
+
<template v-if="tooltipNode" #tooltip>
|
|
127
|
+
<component :is="tooltipNode" />
|
|
112
128
|
</template>
|
|
113
129
|
</a-form-item>
|
|
114
130
|
</a-col>
|