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.
Files changed (204) hide show
  1. package/es/button/src/button.js +14 -14
  2. package/es/button/style.css +1 -58
  3. package/es/checkbox/src/checkbox.js +1 -1
  4. package/es/edit/src/hook.js +29 -13
  5. package/es/export/src/export-panel.js +1 -1
  6. package/es/export/src/hook.js +45 -45
  7. package/es/export/src/import-panel.js +2 -2
  8. package/es/export/src/util.js +7 -7
  9. package/es/filter/src/hook.js +5 -5
  10. package/es/filter/src/panel.js +1 -1
  11. package/es/footer/src/footer.js +15 -15
  12. package/es/form/src/form-config-item.js +8 -7
  13. package/es/form/src/form-item.js +8 -7
  14. package/es/form/src/form.js +8 -6
  15. package/es/form/style.css +0 -3
  16. package/es/grid/src/grid.js +18 -13
  17. package/es/grid/style.css +1 -1
  18. package/es/header/src/header.js +18 -18
  19. package/es/header/style.css +0 -95
  20. package/es/icon/style.css +371 -495
  21. package/es/input/src/input.js +26 -26
  22. package/es/input/style.css +13 -4
  23. package/es/keyboard/src/hook.js +7 -7
  24. package/es/list/src/list.js +5 -5
  25. package/es/loading/src/loading.js +1 -1
  26. package/es/menu/src/hooks.js +9 -9
  27. package/es/menu/src/panel.js +2 -2
  28. package/es/modal/src/modal.js +52 -51
  29. package/es/modal/style.css +2 -3
  30. package/es/pager/src/pager.js +3 -3
  31. package/es/pager/style.css +4 -2
  32. package/es/pulldown/src/pulldown.js +7 -7
  33. package/es/radio/src/button.js +1 -1
  34. package/es/radio/src/radio.js +1 -1
  35. package/es/select/src/select.js +13 -12
  36. package/es/select/style.css +1 -0
  37. package/es/style.css +1 -1
  38. package/es/style.min.css +1 -1
  39. package/es/switch/src/switch.js +1 -1
  40. package/es/table/src/body.js +38 -34
  41. package/es/table/src/cell.js +12 -8
  42. package/es/table/src/columnInfo.js +4 -4
  43. package/es/table/src/table.js +63 -58
  44. package/es/table/src/util.js +2 -2
  45. package/es/table/style.css +98 -0
  46. package/es/textarea/src/textarea.js +5 -5
  47. package/es/toolbar/src/toolbar.js +7 -6
  48. package/es/toolbar/style.css +1 -1
  49. package/es/tools/dom.js +2 -2
  50. package/es/tools/log.js +1 -1
  51. package/es/tools/vn.js +7 -0
  52. package/es/tooltip/src/tooltip.js +22 -10
  53. package/es/v-x-e-table/index.js +1 -1
  54. package/es/v-x-e-table/src/conf.js +38 -38
  55. package/es/v-x-e-table/src/interceptor.js +1 -1
  56. package/es/v-x-e-table/src/renderer.js +19 -15
  57. package/es/v-x-e-table/style.css +359 -459
  58. package/lib/button/src/button.js +10 -10
  59. package/lib/button/src/button.min.js +1 -1
  60. package/lib/button/style/style.css +1 -58
  61. package/lib/button/style/style.min.css +1 -1
  62. package/lib/checkbox/src/checkbox.js +1 -1
  63. package/lib/checkbox/src/checkbox.min.js +1 -1
  64. package/lib/edit/src/hook.js +14 -13
  65. package/lib/edit/src/hook.min.js +1 -1
  66. package/lib/export/src/export-panel.js +1 -1
  67. package/lib/export/src/export-panel.min.js +1 -1
  68. package/lib/export/src/hook.js +50 -50
  69. package/lib/export/src/hook.min.js +1 -1
  70. package/lib/export/src/import-panel.js +3 -3
  71. package/lib/export/src/import-panel.min.js +1 -1
  72. package/lib/export/src/util.js +4 -4
  73. package/lib/export/src/util.min.js +1 -1
  74. package/lib/filter/src/hook.js +5 -5
  75. package/lib/filter/src/hook.min.js +1 -1
  76. package/lib/filter/src/panel.js +1 -1
  77. package/lib/filter/src/panel.min.js +1 -1
  78. package/lib/footer/src/footer.js +14 -14
  79. package/lib/footer/src/footer.min.js +1 -1
  80. package/lib/form/src/form-config-item.js +9 -7
  81. package/lib/form/src/form-config-item.min.js +1 -1
  82. package/lib/form/src/form-item.js +9 -7
  83. package/lib/form/src/form-item.min.js +1 -1
  84. package/lib/form/src/form.js +9 -6
  85. package/lib/form/src/form.min.js +1 -1
  86. package/lib/form/style/style.css +0 -3
  87. package/lib/form/style/style.min.css +1 -1
  88. package/lib/grid/src/grid.js +17 -13
  89. package/lib/grid/src/grid.min.js +1 -1
  90. package/lib/grid/style/style.css +1 -1
  91. package/lib/grid/style/style.min.css +1 -1
  92. package/lib/header/src/header.js +17 -17
  93. package/lib/header/src/header.min.js +1 -1
  94. package/lib/header/style/style.css +0 -95
  95. package/lib/header/style/style.min.css +0 -1
  96. package/lib/icon/style/style.css +371 -495
  97. package/lib/icon/style/style.min.css +1 -1
  98. package/lib/index.umd.js +113 -88
  99. package/lib/index.umd.min.js +1 -1
  100. package/lib/input/src/input.js +23 -23
  101. package/lib/input/src/input.min.js +1 -1
  102. package/lib/input/style/style.css +13 -4
  103. package/lib/input/style/style.min.css +1 -1
  104. package/lib/keyboard/src/hook.js +7 -7
  105. package/lib/keyboard/src/hook.min.js +1 -1
  106. package/lib/list/src/list.js +5 -5
  107. package/lib/list/src/list.min.js +1 -1
  108. package/lib/loading/src/loading.js +1 -1
  109. package/lib/loading/src/loading.min.js +1 -1
  110. package/lib/menu/src/hooks.js +9 -9
  111. package/lib/menu/src/hooks.min.js +1 -1
  112. package/lib/menu/src/panel.js +2 -2
  113. package/lib/menu/src/panel.min.js +1 -1
  114. package/lib/modal/src/modal.js +55 -53
  115. package/lib/modal/src/modal.min.js +1 -1
  116. package/lib/modal/style/style.css +2 -3
  117. package/lib/modal/style/style.min.css +1 -1
  118. package/lib/pager/src/pager.js +2 -2
  119. package/lib/pager/src/pager.min.js +1 -1
  120. package/lib/pager/style/style.css +4 -2
  121. package/lib/pager/style/style.min.css +1 -1
  122. package/lib/pulldown/src/pulldown.js +7 -7
  123. package/lib/pulldown/src/pulldown.min.js +1 -1
  124. package/lib/radio/src/button.js +1 -1
  125. package/lib/radio/src/button.min.js +1 -1
  126. package/lib/radio/src/radio.js +1 -1
  127. package/lib/radio/src/radio.min.js +1 -1
  128. package/lib/select/src/select.js +14 -12
  129. package/lib/select/src/select.min.js +1 -1
  130. package/lib/select/style/style.css +1 -0
  131. package/lib/select/style/style.min.css +1 -1
  132. package/lib/style.css +1 -1
  133. package/lib/style.min.css +1 -1
  134. package/lib/switch/src/switch.js +1 -1
  135. package/lib/switch/src/switch.min.js +1 -1
  136. package/lib/table/src/body.js +36 -34
  137. package/lib/table/src/body.min.js +1 -1
  138. package/lib/table/src/cell.js +17 -11
  139. package/lib/table/src/cell.min.js +1 -1
  140. package/lib/table/src/columnInfo.js +4 -4
  141. package/lib/table/src/columnInfo.min.js +1 -1
  142. package/lib/table/src/table.js +63 -59
  143. package/lib/table/src/table.min.js +1 -1
  144. package/lib/table/src/util.js +2 -2
  145. package/lib/table/src/util.min.js +1 -1
  146. package/lib/table/style/style.css +98 -0
  147. package/lib/table/style/style.min.css +1 -1
  148. package/lib/textarea/src/textarea.js +6 -6
  149. package/lib/textarea/src/textarea.min.js +1 -1
  150. package/lib/toolbar/src/toolbar.js +10 -8
  151. package/lib/toolbar/src/toolbar.min.js +1 -1
  152. package/lib/toolbar/style/style.css +1 -1
  153. package/lib/toolbar/style/style.min.css +1 -1
  154. package/lib/tools/dom.js +2 -2
  155. package/lib/tools/dom.min.js +1 -1
  156. package/lib/tools/log.js +1 -1
  157. package/lib/tools/log.min.js +1 -1
  158. package/lib/tools/vn.js +13 -0
  159. package/lib/tools/vn.min.js +1 -1
  160. package/lib/tooltip/src/tooltip.js +22 -8
  161. package/lib/tooltip/src/tooltip.min.js +1 -1
  162. package/lib/v-x-e-table/index.js +1 -1
  163. package/lib/v-x-e-table/index.min.js +1 -1
  164. package/lib/v-x-e-table/src/conf.js +38 -38
  165. package/lib/v-x-e-table/src/conf.min.js +1 -1
  166. package/lib/v-x-e-table/src/interceptor.js +1 -1
  167. package/lib/v-x-e-table/src/interceptor.min.js +1 -1
  168. package/lib/v-x-e-table/src/renderer.js +18 -16
  169. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  170. package/lib/v-x-e-table/style/style.css +359 -459
  171. package/lib/v-x-e-table/style/style.min.css +1 -1
  172. package/package.json +5 -5
  173. package/packages/edit/src/hook.ts +18 -6
  174. package/packages/form/src/form-config-item.ts +4 -3
  175. package/packages/form/src/form-item.ts +4 -3
  176. package/packages/form/src/form.ts +6 -4
  177. package/packages/grid/src/grid.ts +2 -1
  178. package/packages/input/src/input.ts +3 -3
  179. package/packages/modal/src/modal.ts +5 -4
  180. package/packages/select/src/select.ts +2 -1
  181. package/packages/table/src/cell.ts +14 -10
  182. package/packages/table/src/table.ts +9 -8
  183. package/packages/toolbar/src/toolbar.ts +4 -3
  184. package/packages/tools/vn.ts +10 -0
  185. package/packages/tooltip/src/tooltip.ts +8 -4
  186. package/packages/v-x-e-table/src/conf.ts +38 -38
  187. package/styles/button.scss +1 -43
  188. package/styles/form.scss +0 -3
  189. package/styles/header.scss +0 -134
  190. package/styles/icon.scss +507 -713
  191. package/styles/input.scss +8 -0
  192. package/styles/modal.scss +0 -1
  193. package/styles/pager.scss +2 -0
  194. package/styles/select.scss +1 -0
  195. package/styles/table.scss +136 -0
  196. package/styles/variable.scss +1 -1
  197. package/types/all.d.ts +6 -0
  198. package/types/column.d.ts +11 -11
  199. package/types/component.d.ts +3 -1
  200. package/types/form-item.d.ts +1 -0
  201. package/types/form.d.ts +6 -2
  202. package/types/grid.d.ts +4 -4
  203. package/types/table.d.ts +2 -2
  204. 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
@@ -259,7 +259,6 @@
259
259
  .vxe-modal--close-btn {
260
260
  position: absolute;
261
261
  right: 14px;
262
- top: 0.85em;
263
262
  z-index: 1;
264
263
  cursor: pointer;
265
264
  &:hover {
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;
@@ -29,6 +29,7 @@
29
29
  & > .vxe-input {
30
30
  width: 100%;
31
31
  .vxe-input--suffix-icon {
32
+ display: inline-block;
32
33
  @include animatTransition(transform, .2s);
33
34
  }
34
35
  }
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;
@@ -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.2) !default;
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
@@ -61,6 +61,12 @@ declare module 'vue' {
61
61
  }
62
62
  }
63
63
 
64
+ declare global {
65
+ interface Window {
66
+ VXETable: VXETableCore;
67
+ }
68
+ }
69
+
64
70
  // Constructor
65
71
  export * from './v-x-e-table'
66
72
  export * from './component'
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) => JSX.Element[] | VNode[] | string[]) | null
212
- radio?: string | ((params: DefaultSlotParams) => JSX.Element[] | VNode[] | string[]) | null
213
- checkbox?: string | ((params: DefaultSlotParams) => JSX.Element[] | VNode[] | string[]) | null
214
- default?: string | ((params: DefaultSlotParams) => JSX.Element[] | VNode[] | string[]) | null
215
- header?: string | ((params: HeaderSlotParams) => JSX.Element[] | VNode[] | string[]) | null
216
- footer?: string | ((params: FooterSlotParams) => JSX.Element[] | VNode[] | string[]) | null
217
- content?: string | ((params: ContentSlotParams) => JSX.Element[] | VNode[] | string[]) | null
218
- filter?: string | ((params: FilterSlotParams) => JSX.Element[] | VNode[] | string[]) | null
219
- edit?: string | ((params: EditSlotParams) => JSX.Element[] | VNode[] | string[]) | null
220
- icon?: string | ((params: IconSlotParams) => JSX.Element[] | VNode[] | string[]) | null
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
 
@@ -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
@@ -105,6 +105,7 @@ export namespace VxeFormItemPropTypes {
105
105
  property: string
106
106
  }
107
107
  export type ClassName = string | ((params: ClassNameParams) => string)
108
+ export type Readonly = boolean
108
109
 
109
110
  interface PrefixOption {
110
111
  useHTML?: VxeTooltipPropTypes.UseHTML
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) => any[]) | string | null, params: T): VNode[]
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) => any[]) | string | null, params: T): VNode[]
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) => any[]) | string | null, params: T): VNode[]
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 | JSX.Element[]>
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 = VNode[] | string[]
57
+ export type RenderResult = SlotVNodeType | SlotVNodeType[]
57
58
 
58
59
  export interface RenderFilterOptions extends VxeColumnPropTypes.FilterRender {}
59
60