vxe-table 4.2.8 → 4.3.0-beta.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/es/button/src/button.js +14 -14
- package/es/button/style.css +1 -58
- package/es/checkbox/src/checkbox.js +1 -1
- package/es/edit/src/hook.js +29 -13
- package/es/export/src/export-panel.js +1 -1
- package/es/export/src/hook.js +45 -45
- package/es/export/src/import-panel.js +2 -2
- package/es/export/src/util.js +7 -7
- package/es/filter/src/hook.js +5 -5
- package/es/filter/src/panel.js +1 -1
- package/es/footer/src/footer.js +15 -15
- package/es/form/src/form-config-item.js +8 -7
- package/es/form/src/form-item.js +8 -7
- package/es/form/src/form.js +8 -6
- package/es/form/style.css +0 -3
- package/es/grid/src/grid.js +18 -13
- package/es/grid/style.css +1 -1
- package/es/header/src/header.js +18 -18
- package/es/header/style.css +0 -95
- package/es/icon/style.css +371 -495
- package/es/input/src/input.js +26 -26
- package/es/input/style.css +13 -4
- package/es/keyboard/src/hook.js +7 -7
- package/es/list/src/list.js +5 -5
- package/es/loading/src/loading.js +1 -1
- package/es/menu/src/hooks.js +9 -9
- package/es/menu/src/panel.js +2 -2
- package/es/modal/src/modal.js +52 -51
- package/es/modal/style.css +2 -3
- package/es/pager/src/pager.js +3 -3
- package/es/pager/style.css +4 -2
- package/es/pulldown/src/pulldown.js +7 -7
- package/es/radio/src/button.js +1 -1
- package/es/radio/src/radio.js +1 -1
- package/es/select/src/select.js +13 -12
- package/es/select/style.css +1 -0
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/src/switch.js +1 -1
- package/es/table/src/body.js +38 -34
- package/es/table/src/cell.js +12 -8
- package/es/table/src/columnInfo.js +4 -4
- package/es/table/src/table.js +63 -58
- package/es/table/src/util.js +2 -2
- package/es/table/style.css +98 -0
- package/es/textarea/src/textarea.js +5 -5
- package/es/toolbar/src/toolbar.js +7 -6
- package/es/toolbar/style.css +1 -1
- package/es/tools/dom.js +2 -2
- package/es/tools/log.js +1 -1
- package/es/tools/vn.js +7 -0
- package/es/tooltip/src/tooltip.js +22 -10
- package/es/v-x-e-table/index.js +1 -1
- package/es/v-x-e-table/src/conf.js +38 -38
- package/es/v-x-e-table/src/interceptor.js +1 -1
- package/es/v-x-e-table/src/renderer.js +19 -15
- package/es/v-x-e-table/style.css +359 -459
- package/lib/button/src/button.js +10 -10
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +1 -58
- package/lib/button/style/style.min.css +1 -1
- package/lib/checkbox/src/checkbox.js +1 -1
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/edit/src/hook.js +14 -13
- package/lib/edit/src/hook.min.js +1 -1
- package/lib/export/src/export-panel.js +1 -1
- package/lib/export/src/export-panel.min.js +1 -1
- package/lib/export/src/hook.js +50 -50
- package/lib/export/src/hook.min.js +1 -1
- package/lib/export/src/import-panel.js +3 -3
- package/lib/export/src/import-panel.min.js +1 -1
- package/lib/export/src/util.js +4 -4
- package/lib/export/src/util.min.js +1 -1
- package/lib/filter/src/hook.js +5 -5
- package/lib/filter/src/hook.min.js +1 -1
- package/lib/filter/src/panel.js +1 -1
- package/lib/filter/src/panel.min.js +1 -1
- package/lib/footer/src/footer.js +14 -14
- package/lib/footer/src/footer.min.js +1 -1
- package/lib/form/src/form-config-item.js +9 -7
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-item.js +9 -7
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +9 -6
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/style/style.css +0 -3
- package/lib/form/style/style.min.css +1 -1
- package/lib/grid/src/grid.js +17 -13
- package/lib/grid/src/grid.min.js +1 -1
- package/lib/grid/style/style.css +1 -1
- package/lib/grid/style/style.min.css +1 -1
- package/lib/header/src/header.js +17 -17
- package/lib/header/src/header.min.js +1 -1
- package/lib/header/style/style.css +0 -95
- package/lib/header/style/style.min.css +0 -1
- package/lib/icon/style/style.css +371 -495
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +113 -88
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +23 -23
- package/lib/input/src/input.min.js +1 -1
- package/lib/input/style/style.css +13 -4
- package/lib/input/style/style.min.css +1 -1
- package/lib/keyboard/src/hook.js +7 -7
- package/lib/keyboard/src/hook.min.js +1 -1
- package/lib/list/src/list.js +5 -5
- package/lib/list/src/list.min.js +1 -1
- package/lib/loading/src/loading.js +1 -1
- package/lib/loading/src/loading.min.js +1 -1
- package/lib/menu/src/hooks.js +9 -9
- package/lib/menu/src/hooks.min.js +1 -1
- package/lib/menu/src/panel.js +2 -2
- package/lib/menu/src/panel.min.js +1 -1
- package/lib/modal/src/modal.js +55 -53
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/modal/style/style.css +2 -3
- package/lib/modal/style/style.min.css +1 -1
- package/lib/pager/src/pager.js +2 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pager/style/style.css +4 -2
- package/lib/pager/style/style.min.css +1 -1
- package/lib/pulldown/src/pulldown.js +7 -7
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/radio/src/button.js +1 -1
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/radio.js +1 -1
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/select/src/select.js +14 -12
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +1 -0
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/src/switch.js +1 -1
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/table/src/body.js +36 -34
- package/lib/table/src/body.min.js +1 -1
- package/lib/table/src/cell.js +17 -11
- package/lib/table/src/cell.min.js +1 -1
- package/lib/table/src/columnInfo.js +4 -4
- package/lib/table/src/columnInfo.min.js +1 -1
- package/lib/table/src/table.js +63 -59
- package/lib/table/src/table.min.js +1 -1
- package/lib/table/src/util.js +2 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +98 -0
- package/lib/table/style/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +6 -6
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/toolbar/src/toolbar.js +10 -8
- package/lib/toolbar/src/toolbar.min.js +1 -1
- package/lib/toolbar/style/style.css +1 -1
- package/lib/toolbar/style/style.min.css +1 -1
- package/lib/tools/dom.js +2 -2
- package/lib/tools/dom.min.js +1 -1
- package/lib/tools/log.js +1 -1
- package/lib/tools/log.min.js +1 -1
- package/lib/tools/vn.js +13 -0
- package/lib/tools/vn.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +22 -8
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/v-x-e-table/index.js +1 -1
- package/lib/v-x-e-table/index.min.js +1 -1
- package/lib/v-x-e-table/src/conf.js +38 -38
- package/lib/v-x-e-table/src/conf.min.js +1 -1
- package/lib/v-x-e-table/src/interceptor.js +1 -1
- package/lib/v-x-e-table/src/interceptor.min.js +1 -1
- package/lib/v-x-e-table/src/renderer.js +18 -16
- package/lib/v-x-e-table/src/renderer.min.js +1 -1
- package/lib/v-x-e-table/style/style.css +359 -459
- package/lib/v-x-e-table/style/style.min.css +1 -1
- package/package.json +5 -5
- package/packages/edit/src/hook.ts +18 -6
- package/packages/form/src/form-config-item.ts +4 -3
- package/packages/form/src/form-item.ts +4 -3
- package/packages/form/src/form.ts +6 -4
- package/packages/grid/src/grid.ts +2 -1
- package/packages/input/src/input.ts +3 -3
- package/packages/modal/src/modal.ts +5 -4
- package/packages/select/src/select.ts +2 -1
- package/packages/table/src/cell.ts +14 -10
- package/packages/table/src/table.ts +9 -8
- package/packages/toolbar/src/toolbar.ts +4 -3
- package/packages/tools/vn.ts +10 -0
- package/packages/tooltip/src/tooltip.ts +8 -4
- package/packages/v-x-e-table/src/conf.ts +38 -38
- package/styles/button.scss +1 -43
- package/styles/form.scss +0 -3
- package/styles/header.scss +0 -134
- package/styles/icon.scss +507 -713
- package/styles/input.scss +8 -0
- package/styles/modal.scss +0 -1
- package/styles/pager.scss +2 -0
- package/styles/select.scss +1 -0
- package/styles/table.scss +136 -0
- package/styles/variable.scss +1 -1
- package/types/all.d.ts +6 -0
- package/types/column.d.ts +11 -11
- package/types/component.d.ts +3 -1
- package/types/form-item.d.ts +1 -0
- package/types/form.d.ts +6 -2
- package/types/grid.d.ts +4 -4
- package/types/table.d.ts +2 -2
- package/types/v-x-e-table/renderer.d.ts +3 -2
package/styles/input.scss
CHANGED
|
@@ -237,6 +237,9 @@ $iconWidth: 1.6em;
|
|
|
237
237
|
left: 50%;
|
|
238
238
|
top: 50%;
|
|
239
239
|
transform: translate(-50%, -50%);
|
|
240
|
+
&[class*="vxe-icon-"] {
|
|
241
|
+
font-size: 1.5em;
|
|
242
|
+
}
|
|
240
243
|
}
|
|
241
244
|
|
|
242
245
|
.vxe-input--date-picker-suffix {
|
|
@@ -258,6 +261,7 @@ $iconWidth: 1.6em;
|
|
|
258
261
|
}
|
|
259
262
|
.vxe-input--number-prev-icon,
|
|
260
263
|
.vxe-input--number-next-icon {
|
|
264
|
+
line-height: 0.8em;
|
|
261
265
|
position: absolute;
|
|
262
266
|
left: 50%;
|
|
263
267
|
transform: translateX(-50%);
|
|
@@ -676,6 +680,7 @@ $iconWidth: 1.6em;
|
|
|
676
680
|
.vxe-input {
|
|
677
681
|
font-size: $vxe-font-size;
|
|
678
682
|
height: $vxe-input-height-default;
|
|
683
|
+
line-height: $vxe-input-height-default;
|
|
679
684
|
.vxe-input--inner {
|
|
680
685
|
&[type="date"]::-webkit-inner-spin-button,
|
|
681
686
|
&[type="month"]::-webkit-inner-spin-button,
|
|
@@ -692,6 +697,7 @@ $iconWidth: 1.6em;
|
|
|
692
697
|
&.size--medium {
|
|
693
698
|
font-size: $vxe-font-size-medium;
|
|
694
699
|
height: $vxe-input-height-medium;
|
|
700
|
+
line-height: $vxe-input-height-medium;
|
|
695
701
|
.vxe-input--inner {
|
|
696
702
|
&[type="date"]::-webkit-inner-spin-button,
|
|
697
703
|
&[type="month"]::-webkit-inner-spin-button,
|
|
@@ -703,6 +709,7 @@ $iconWidth: 1.6em;
|
|
|
703
709
|
&.size--small {
|
|
704
710
|
font-size: $vxe-font-size-small;
|
|
705
711
|
height: $vxe-input-height-small;
|
|
712
|
+
line-height: $vxe-input-height-small;
|
|
706
713
|
.vxe-input--inner {
|
|
707
714
|
&[type="date"]::-webkit-inner-spin-button,
|
|
708
715
|
&[type="month"]::-webkit-inner-spin-button,
|
|
@@ -714,6 +721,7 @@ $iconWidth: 1.6em;
|
|
|
714
721
|
&.size--mini {
|
|
715
722
|
font-size: $vxe-font-size-mini;
|
|
716
723
|
height: $vxe-input-height-mini;
|
|
724
|
+
line-height: $vxe-input-height-mini;
|
|
717
725
|
.vxe-input--inner {
|
|
718
726
|
&[type="date"]::-webkit-inner-spin-button,
|
|
719
727
|
&[type="month"]::-webkit-inner-spin-button,
|
package/styles/modal.scss
CHANGED
package/styles/pager.scss
CHANGED
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
.vxe-pager--jump-next {
|
|
40
40
|
color: inherit;
|
|
41
41
|
outline: 0;
|
|
42
|
+
padding: 0;
|
|
42
43
|
border: 1px solid transparent;
|
|
43
44
|
&:not(.is--disabled) {
|
|
44
45
|
&:focus {
|
|
@@ -153,6 +154,7 @@
|
|
|
153
154
|
.vxe-pager--jump .vxe-pager--goto,
|
|
154
155
|
.vxe-pager--sizes > .vxe-input {
|
|
155
156
|
height: 2.15em;
|
|
157
|
+
line-height: 2.15em;
|
|
156
158
|
}
|
|
157
159
|
.vxe-pager--sizes > .vxe-select--panel .vxe-select-option {
|
|
158
160
|
text-align: center;
|
package/styles/select.scss
CHANGED
package/styles/table.scss
CHANGED
|
@@ -311,6 +311,142 @@
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
+
/*header*/
|
|
315
|
+
.vxe-table {
|
|
316
|
+
.vxe-table--header-wrapper {
|
|
317
|
+
color: $vxe-table-header-font-color;
|
|
318
|
+
.vxe-table--header-border-line {
|
|
319
|
+
position: absolute;
|
|
320
|
+
left: 0;
|
|
321
|
+
bottom: 0;
|
|
322
|
+
height: 0;
|
|
323
|
+
border-bottom: $vxe-table-border-width solid $vxe-table-border-color;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
/*排序*/
|
|
327
|
+
.vxe-cell--sort {
|
|
328
|
+
width: 1.5em;
|
|
329
|
+
height: 1.35em;
|
|
330
|
+
vertical-align: middle;
|
|
331
|
+
text-align: center;
|
|
332
|
+
display: inline-block;
|
|
333
|
+
position: relative;
|
|
334
|
+
}
|
|
335
|
+
.vxe-sort--asc-btn,
|
|
336
|
+
.vxe-sort--desc-btn {
|
|
337
|
+
position: absolute;
|
|
338
|
+
left: 0.1em;
|
|
339
|
+
color: $vxe-table-column-icon-border-color;
|
|
340
|
+
width: 1em;
|
|
341
|
+
text-align: center;
|
|
342
|
+
height: 0.8em;
|
|
343
|
+
line-height: 0.8em;
|
|
344
|
+
cursor: pointer;
|
|
345
|
+
&:hover {
|
|
346
|
+
color: $vxe-table-font-color;
|
|
347
|
+
}
|
|
348
|
+
&.sort--active {
|
|
349
|
+
color: $vxe-primary-color;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
.vxe-sort--asc-btn {
|
|
353
|
+
top: -0.2em;
|
|
354
|
+
}
|
|
355
|
+
.vxe-sort--desc-btn {
|
|
356
|
+
bottom: -0.2em;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.vxe-header--column {
|
|
361
|
+
position: relative;
|
|
362
|
+
font-weight: $vxe-table-header-font-weight;
|
|
363
|
+
// user-select: none;
|
|
364
|
+
&.col--ellipsis {
|
|
365
|
+
& > .vxe-cell {
|
|
366
|
+
display: flex;
|
|
367
|
+
align-items: center;
|
|
368
|
+
.vxe-cell--title {
|
|
369
|
+
overflow: hidden;
|
|
370
|
+
text-overflow: ellipsis;
|
|
371
|
+
white-space: nowrap;
|
|
372
|
+
}
|
|
373
|
+
& > i,
|
|
374
|
+
& > span {
|
|
375
|
+
&:not(.vxe-cell--title) {
|
|
376
|
+
flex-shrink: 0;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
.vxe-cell--required-icon {
|
|
382
|
+
display: inline-block;
|
|
383
|
+
color: $vxe-table-validate-error-color;
|
|
384
|
+
width: 0.8em;
|
|
385
|
+
height: 1em;
|
|
386
|
+
line-height: 1em;
|
|
387
|
+
font-family: $vxe-icon-font-family;
|
|
388
|
+
font-weight: normal;
|
|
389
|
+
position: relative;
|
|
390
|
+
&:before {
|
|
391
|
+
content: "*";
|
|
392
|
+
position: absolute;
|
|
393
|
+
left: 0;
|
|
394
|
+
top: 0.2em;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
// .vxe-cell--required-icon,
|
|
398
|
+
// .vxe-cell--edit-icon,
|
|
399
|
+
// .vxe-cell-help-icon,
|
|
400
|
+
// .vxe-cell--title {
|
|
401
|
+
// vertical-align: middle;
|
|
402
|
+
// }
|
|
403
|
+
.vxe-cell--required-icon {
|
|
404
|
+
margin-right: 0.1em;
|
|
405
|
+
}
|
|
406
|
+
.vxe-cell--edit-icon,
|
|
407
|
+
.vxe-cell-help-icon {
|
|
408
|
+
margin-right: 0.2em;
|
|
409
|
+
}
|
|
410
|
+
.vxe-cell-help-icon {
|
|
411
|
+
cursor: help;
|
|
412
|
+
}
|
|
413
|
+
.vxe-resizable {
|
|
414
|
+
position: absolute;
|
|
415
|
+
right: -7px;
|
|
416
|
+
bottom: 0;
|
|
417
|
+
width: 14px;
|
|
418
|
+
height: 100%;
|
|
419
|
+
text-align: center;
|
|
420
|
+
z-index: 1;
|
|
421
|
+
cursor: col-resize;
|
|
422
|
+
&.is--line {
|
|
423
|
+
&:before,
|
|
424
|
+
&:after {
|
|
425
|
+
content: "";
|
|
426
|
+
display: inline-block;
|
|
427
|
+
vertical-align: middle;
|
|
428
|
+
}
|
|
429
|
+
&:before {
|
|
430
|
+
width: 1px;
|
|
431
|
+
height: 50%;
|
|
432
|
+
background-color: $vxe-table-resizable-line-color;
|
|
433
|
+
}
|
|
434
|
+
&:after {
|
|
435
|
+
width: 0;
|
|
436
|
+
height: 100%;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
.vxe-table--fixed-right-wrapper {
|
|
442
|
+
.vxe-header--column {
|
|
443
|
+
.vxe-resizable {
|
|
444
|
+
right: auto;
|
|
445
|
+
left: -7px;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
314
450
|
/*table*/
|
|
315
451
|
.vxe-table--render-default {
|
|
316
452
|
position: relative;
|
package/styles/variable.scss
CHANGED
|
@@ -108,7 +108,7 @@ $vxe-table-menu-item-width: 178px !default;
|
|
|
108
108
|
$vxe-table-menu-background-color: #fff !default;
|
|
109
109
|
|
|
110
110
|
/*loading*/
|
|
111
|
-
$vxe-loading-background-color: rgba(0, 0, 0, 0.
|
|
111
|
+
$vxe-loading-background-color: rgba(0, 0, 0, 0.3) !default;
|
|
112
112
|
$vxe-loading-z-index: 999 !default;
|
|
113
113
|
|
|
114
114
|
/*validate*/
|
package/types/all.d.ts
CHANGED
package/types/column.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VNode } from 'vue'
|
|
2
|
-
import { VXEComponent } from './component'
|
|
2
|
+
import { VXEComponent, SlotVNodeType } from './component'
|
|
3
3
|
import { VxeTableConstructor, VxeTableDefines, VxeTablePropTypes } from './table'
|
|
4
4
|
import { VxeGlobalRendererHandles } from './v-x-e-table'
|
|
5
5
|
import { VxeFilterPanel } from './filter'
|
|
@@ -208,16 +208,16 @@ export namespace VxeColumnPropTypes {
|
|
|
208
208
|
interface IconSlotParams extends DefaultSlotParams { }
|
|
209
209
|
|
|
210
210
|
export type Slots = {
|
|
211
|
-
title?: string | ((params: HeaderSlotParams) =>
|
|
212
|
-
radio?: string | ((params: DefaultSlotParams) =>
|
|
213
|
-
checkbox?: string | ((params: DefaultSlotParams) =>
|
|
214
|
-
default?: string | ((params: DefaultSlotParams) =>
|
|
215
|
-
header?: string | ((params: HeaderSlotParams) =>
|
|
216
|
-
footer?: string | ((params: FooterSlotParams) =>
|
|
217
|
-
content?: string | ((params: ContentSlotParams) =>
|
|
218
|
-
filter?: string | ((params: FilterSlotParams) =>
|
|
219
|
-
edit?: string | ((params: EditSlotParams) =>
|
|
220
|
-
icon?: string | ((params: IconSlotParams) =>
|
|
211
|
+
title?: string | ((params: HeaderSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
212
|
+
radio?: string | ((params: DefaultSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
213
|
+
checkbox?: string | ((params: DefaultSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
214
|
+
default?: string | ((params: DefaultSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
215
|
+
header?: string | ((params: HeaderSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
216
|
+
footer?: string | ((params: FooterSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
217
|
+
content?: string | ((params: ContentSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
218
|
+
filter?: string | ((params: FilterSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
219
|
+
edit?: string | ((params: EditSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
220
|
+
icon?: string | ((params: IconSlotParams) => SlotVNodeType[] | SlotVNodeType) | null
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
package/types/component.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { App, ComponentPublicInstance } from 'vue'
|
|
1
|
+
import { App, ComponentPublicInstance, VNode } from 'vue'
|
|
2
2
|
|
|
3
3
|
export type SizeType = null | 'medium' | 'small' | 'mini'
|
|
4
4
|
export type ValueOf<T> = T extends any[] ? T[number] : T[keyof T]
|
|
@@ -27,3 +27,5 @@ export interface VxeEvent {
|
|
|
27
27
|
export type VNodeStyle = {
|
|
28
28
|
[key: string]: string | number
|
|
29
29
|
}
|
|
30
|
+
|
|
31
|
+
export type SlotVNodeType = JSX.Element | VNode | string | number
|
package/types/form-item.d.ts
CHANGED
package/types/form.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RenderFunction, SetupContext, ComponentPublicInstance, Ref, ComputedRef, VNode } from 'vue'
|
|
2
|
-
import { VXEComponent, VxeComponentBase, VxeEvent, SizeType, ValueOf } from './component'
|
|
2
|
+
import { VXEComponent, VxeComponentBase, VxeEvent, SizeType, ValueOf, SlotVNodeType } from './component'
|
|
3
3
|
import { VxeFormItemProps, VxeFormItemPropTypes } from './form-item'
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -77,6 +77,8 @@ export namespace VxeFormPropTypes {
|
|
|
77
77
|
|
|
78
78
|
export type Items = VxeFormItemProps[]
|
|
79
79
|
|
|
80
|
+
export type Readonly = boolean
|
|
81
|
+
|
|
80
82
|
/**
|
|
81
83
|
* 校验规则配置项
|
|
82
84
|
*/
|
|
@@ -118,6 +120,7 @@ export type VxeFormProps<D = any> = {
|
|
|
118
120
|
titleAsterisk?: VxeFormPropTypes.TitleAsterisk
|
|
119
121
|
titleOverflow?: VxeFormPropTypes.TitleOverflow
|
|
120
122
|
className?: VxeFormPropTypes.ClassName
|
|
123
|
+
readonly?: VxeFormPropTypes.Readonly
|
|
121
124
|
items?: VxeFormPropTypes.Items
|
|
122
125
|
rules?: VxeFormPropTypes.Rules
|
|
123
126
|
preventSubmit?: VxeFormPropTypes.PreventSubmit
|
|
@@ -180,7 +183,7 @@ export interface FormMethods {
|
|
|
180
183
|
export interface VxeFormMethods extends FormMethods { }
|
|
181
184
|
|
|
182
185
|
export interface FormPrivateMethods {
|
|
183
|
-
callSlot<T>(slotFunc: ((params: T) =>
|
|
186
|
+
callSlot<T>(slotFunc: ((params: T) => SlotVNodeType | SlotVNodeType[]) | string | null, params: T): SlotVNodeType[]
|
|
184
187
|
triggerItemEvent(evnt: Event | { type: string }, field: string, itemValue?: any): Promise<any>
|
|
185
188
|
toggleCollapseEvent(evnt: Event): void
|
|
186
189
|
triggerTitleTipEvent(evnt: MouseEvent, params: {
|
|
@@ -211,6 +214,7 @@ export namespace VxeFormDefines {
|
|
|
211
214
|
folding: VxeFormItemPropTypes.Folding
|
|
212
215
|
collapseNode: VxeFormItemPropTypes.CollapseNode
|
|
213
216
|
className: VxeFormItemPropTypes.ClassName
|
|
217
|
+
readonly: VxeFormItemPropTypes.Readonly
|
|
214
218
|
itemRender: VxeFormItemPropTypes.ItemRender
|
|
215
219
|
// 渲染属性
|
|
216
220
|
showError: boolean
|
package/types/grid.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { VxeFormInstance, VxeFormProps, VxeFormDefines } from './form'
|
|
|
3
3
|
import { VxeFormItemProps } from './form-item'
|
|
4
4
|
import { VxeToolbarInstance, VxeToolbarProps, VxeToolbarPropTypes } from './toolbar'
|
|
5
5
|
import { VxePagerInstance, VxePagerProps, VxePagerDefines } from './pager'
|
|
6
|
-
import { VXEComponent, VxeComponentBase, VxeEvent, SizeType, ValueOf } from './component'
|
|
6
|
+
import { VXEComponent, VxeComponentBase, VxeEvent, SizeType, ValueOf, SlotVNodeType } from './component'
|
|
7
7
|
import { VxeTableInstance, VxeTableDefines, VxeTableEmits, VxeTableConstructor, VxeTableProps, VxeTablePropTypes, TablePublicMethods, VxeTableMethods, VxeTablePrivateMethods } from './table'
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -126,7 +126,7 @@ export interface GridPublicMethods {
|
|
|
126
126
|
export interface VxeGridMethods extends GridMethods, TablePublicMethods { }
|
|
127
127
|
|
|
128
128
|
export interface GridPrivateMethods {
|
|
129
|
-
callSlot<T>(slotFunc: ((params: T) =>
|
|
129
|
+
callSlot<T>(slotFunc: ((params: T) => SlotVNodeType | SlotVNodeType[]) | string | null, params: T): SlotVNodeType[]
|
|
130
130
|
extendTableMethods<T>(methodKeys: T[]): any
|
|
131
131
|
triggerToolbarBtnEvent(button: VxeToolbarPropTypes.ButtonConfig, evnt: Event): void
|
|
132
132
|
triggerToolbarTolEvent(button: VxeToolbarPropTypes.ToolConfig, evnt: Event): void
|
|
@@ -232,8 +232,8 @@ export namespace VxeGridPropTypes {
|
|
|
232
232
|
iconOut?: string
|
|
233
233
|
}
|
|
234
234
|
slots?: {
|
|
235
|
-
buttons?: string | ((params: {}) => VNode[] | string[] | JSX.Element[])
|
|
236
|
-
tools?: string | ((params: {}) => VNode[] | string[] | JSX.Element[])
|
|
235
|
+
buttons?: string | ((params: {}) => VNode[] | string[] | JSX.Element | JSX.Element[])
|
|
236
|
+
tools?: string | ((params: {}) => VNode[] | string[] | JSX.Element | JSX.Element[])
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
|
package/types/table.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RenderFunction, SetupContext, Ref, ComputedRef, ComponentPublicInstance, ComponentInternalInstance, VNode } from 'vue'
|
|
2
|
-
import { VXEComponent, VxeComponentBase, VxeEvent, RecordInfo, SizeType, ValueOf, VNodeStyle } from './component'
|
|
2
|
+
import { VXEComponent, VxeComponentBase, VxeEvent, RecordInfo, SizeType, ValueOf, VNodeStyle, SlotVNodeType } from './component'
|
|
3
3
|
import { VxeTableProEmits, VxeTableProDefines } from './plugins/pro'
|
|
4
4
|
import { VxeColumnPropTypes, VxeColumnProps } from './column'
|
|
5
5
|
import { VXETableSetupOptions, VxeGlobalRendererHandles } from './v-x-e-table'
|
|
@@ -675,7 +675,7 @@ export interface VxeTableMethods extends TableMethods { }
|
|
|
675
675
|
export interface TablePrivateMethods {
|
|
676
676
|
getSetupOptions(): VXETableSetupOptions
|
|
677
677
|
updateAfterDataIndex(): void
|
|
678
|
-
callSlot<T>(slotFunc: ((params: T) =>
|
|
678
|
+
callSlot<T>(slotFunc: ((params: T) => SlotVNodeType | SlotVNodeType[]) | string | null, params: T): SlotVNodeType[]
|
|
679
679
|
getParentElem(): Element | null
|
|
680
680
|
getParentHeight(): number
|
|
681
681
|
getExcludeHeight(): number
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { VNode } from 'vue'
|
|
2
|
+
import { SlotVNodeType } from '../component'
|
|
2
3
|
import { VxeTableDefines, VxeTableConstructor, VxeTablePrivateMethods, VxeTablePropTypes } from '../table'
|
|
3
4
|
import { VxeGridConstructor } from '../grid'
|
|
4
5
|
import { VxeColumnPropTypes } from '../column'
|
|
@@ -6,7 +7,7 @@ import { VxeFilterPanel } from '../filter'
|
|
|
6
7
|
import { VxeToolbarPropTypes } from '../toolbar'
|
|
7
8
|
import { FormItemRenderOptions, FormItemTitleRenderParams, FormItemContentRenderParams, FormItemVisibleParams, FormItemResetParams } from '../form-item'
|
|
8
9
|
|
|
9
|
-
type RendererOptions = DefineRendererOption<VxeGlobalRendererHandles.RenderResult
|
|
10
|
+
type RendererOptions = DefineRendererOption<VxeGlobalRendererHandles.RenderResult>
|
|
10
11
|
|
|
11
12
|
export interface DefineRendererOption<T> {
|
|
12
13
|
// 筛选渲染
|
|
@@ -53,7 +54,7 @@ export interface DefineRendererOption<T> {
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
export namespace VxeGlobalRendererHandles {
|
|
56
|
-
export type RenderResult =
|
|
57
|
+
export type RenderResult = SlotVNodeType | SlotVNodeType[]
|
|
57
58
|
|
|
58
59
|
export interface RenderFilterOptions extends VxeColumnPropTypes.FilterRender {}
|
|
59
60
|
|