vxe-table 4.2.8 → 4.3.0-beta.2

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 (227) 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 +7 -4
  4. package/es/checkbox/style.css +37 -58
  5. package/es/edit/src/hook.js +29 -13
  6. package/es/export/src/export-panel.js +10 -20
  7. package/es/export/src/hook.js +45 -45
  8. package/es/export/src/import-panel.js +2 -2
  9. package/es/export/src/util.js +7 -7
  10. package/es/export/style.css +27 -82
  11. package/es/filter/src/hook.js +5 -5
  12. package/es/filter/src/panel.js +9 -17
  13. package/es/filter/style.css +27 -79
  14. package/es/footer/src/footer.js +15 -15
  15. package/es/form/src/form-config-item.js +8 -7
  16. package/es/form/src/form-item.js +8 -7
  17. package/es/form/src/form.js +8 -6
  18. package/es/form/style.css +0 -3
  19. package/es/grid/src/grid.js +18 -13
  20. package/es/grid/style.css +1 -1
  21. package/es/header/src/header.js +18 -18
  22. package/es/header/style.css +0 -95
  23. package/es/icon/style.css +379 -0
  24. package/es/input/src/input.js +26 -26
  25. package/es/input/style.css +13 -4
  26. package/es/keyboard/src/hook.js +7 -7
  27. package/es/list/src/list.js +5 -5
  28. package/es/loading/src/loading.js +1 -1
  29. package/es/menu/src/hooks.js +9 -9
  30. package/es/menu/src/panel.js +2 -2
  31. package/es/modal/src/modal.js +52 -51
  32. package/es/modal/style.css +2 -3
  33. package/es/pager/src/pager.js +3 -3
  34. package/es/pager/style.css +4 -2
  35. package/es/pulldown/src/pulldown.js +7 -7
  36. package/es/radio/src/button.js +1 -1
  37. package/es/radio/src/radio.js +5 -4
  38. package/es/radio/style.css +32 -55
  39. package/es/select/src/select.js +13 -12
  40. package/es/select/style.css +1 -0
  41. package/es/style.css +1 -1
  42. package/es/style.min.css +1 -1
  43. package/es/switch/src/switch.js +1 -1
  44. package/es/table/src/body.js +38 -34
  45. package/es/table/src/cell.js +16 -28
  46. package/es/table/src/columnInfo.js +4 -4
  47. package/es/table/src/table.js +65 -60
  48. package/es/table/src/util.js +2 -2
  49. package/es/table/style.css +160 -139
  50. package/es/textarea/src/textarea.js +5 -5
  51. package/es/toolbar/src/toolbar.js +17 -24
  52. package/es/toolbar/style.css +28 -80
  53. package/es/tools/dom.js +2 -2
  54. package/es/tools/log.js +1 -1
  55. package/es/tools/vn.js +7 -0
  56. package/es/tooltip/src/tooltip.js +22 -10
  57. package/es/v-x-e-table/index.js +1 -1
  58. package/es/v-x-e-table/src/conf.js +43 -38
  59. package/es/v-x-e-table/src/interceptor.js +1 -1
  60. package/es/v-x-e-table/src/renderer.js +19 -15
  61. package/es/v-x-e-table/style.css +405 -2
  62. package/lib/button/src/button.js +10 -10
  63. package/lib/button/src/button.min.js +1 -1
  64. package/lib/button/style/style.css +1 -58
  65. package/lib/button/style/style.min.css +1 -1
  66. package/lib/checkbox/src/checkbox.js +5 -3
  67. package/lib/checkbox/src/checkbox.min.js +1 -1
  68. package/lib/checkbox/style/style.css +37 -58
  69. package/lib/checkbox/style/style.min.css +1 -1
  70. package/lib/edit/src/hook.js +14 -13
  71. package/lib/edit/src/hook.min.js +1 -1
  72. package/lib/export/src/export-panel.js +11 -17
  73. package/lib/export/src/export-panel.min.js +1 -1
  74. package/lib/export/src/hook.js +50 -50
  75. package/lib/export/src/hook.min.js +1 -1
  76. package/lib/export/src/import-panel.js +3 -3
  77. package/lib/export/src/import-panel.min.js +1 -1
  78. package/lib/export/src/util.js +4 -4
  79. package/lib/export/src/util.min.js +1 -1
  80. package/lib/export/style/style.css +27 -82
  81. package/lib/export/style/style.min.css +1 -1
  82. package/lib/filter/src/hook.js +5 -5
  83. package/lib/filter/src/hook.min.js +1 -1
  84. package/lib/filter/src/panel.js +11 -15
  85. package/lib/filter/src/panel.min.js +1 -1
  86. package/lib/filter/style/style.css +27 -79
  87. package/lib/filter/style/style.min.css +1 -1
  88. package/lib/footer/src/footer.js +14 -14
  89. package/lib/footer/src/footer.min.js +1 -1
  90. package/lib/form/src/form-config-item.js +9 -7
  91. package/lib/form/src/form-config-item.min.js +1 -1
  92. package/lib/form/src/form-item.js +9 -7
  93. package/lib/form/src/form-item.min.js +1 -1
  94. package/lib/form/src/form.js +9 -6
  95. package/lib/form/src/form.min.js +1 -1
  96. package/lib/form/style/style.css +0 -3
  97. package/lib/form/style/style.min.css +1 -1
  98. package/lib/grid/src/grid.js +17 -13
  99. package/lib/grid/src/grid.min.js +1 -1
  100. package/lib/grid/style/style.css +1 -1
  101. package/lib/grid/style/style.min.css +1 -1
  102. package/lib/header/src/header.js +17 -17
  103. package/lib/header/src/header.min.js +1 -1
  104. package/lib/header/style/style.css +0 -95
  105. package/lib/header/style/style.min.css +0 -1
  106. package/lib/icon/style/style.css +379 -0
  107. package/lib/icon/style/style.min.css +1 -1
  108. package/lib/index.umd.js +163 -159
  109. package/lib/index.umd.min.js +1 -1
  110. package/lib/input/src/input.js +23 -23
  111. package/lib/input/src/input.min.js +1 -1
  112. package/lib/input/style/style.css +13 -4
  113. package/lib/input/style/style.min.css +1 -1
  114. package/lib/keyboard/src/hook.js +7 -7
  115. package/lib/keyboard/src/hook.min.js +1 -1
  116. package/lib/list/src/list.js +5 -5
  117. package/lib/list/src/list.min.js +1 -1
  118. package/lib/loading/src/loading.js +1 -1
  119. package/lib/loading/src/loading.min.js +1 -1
  120. package/lib/menu/src/hooks.js +9 -9
  121. package/lib/menu/src/hooks.min.js +1 -1
  122. package/lib/menu/src/panel.js +2 -2
  123. package/lib/menu/src/panel.min.js +1 -1
  124. package/lib/modal/src/modal.js +55 -53
  125. package/lib/modal/src/modal.min.js +1 -1
  126. package/lib/modal/style/style.css +2 -3
  127. package/lib/modal/style/style.min.css +1 -1
  128. package/lib/pager/src/pager.js +2 -2
  129. package/lib/pager/src/pager.min.js +1 -1
  130. package/lib/pager/style/style.css +4 -2
  131. package/lib/pager/style/style.min.css +1 -1
  132. package/lib/pulldown/src/pulldown.js +7 -7
  133. package/lib/pulldown/src/pulldown.min.js +1 -1
  134. package/lib/radio/src/button.js +1 -1
  135. package/lib/radio/src/button.min.js +1 -1
  136. package/lib/radio/src/radio.js +4 -4
  137. package/lib/radio/src/radio.min.js +1 -1
  138. package/lib/radio/style/style.css +32 -55
  139. package/lib/radio/style/style.min.css +1 -1
  140. package/lib/select/src/select.js +14 -12
  141. package/lib/select/src/select.min.js +1 -1
  142. package/lib/select/style/style.css +1 -0
  143. package/lib/select/style/style.min.css +1 -1
  144. package/lib/style.css +1 -1
  145. package/lib/style.min.css +1 -1
  146. package/lib/switch/src/switch.js +1 -1
  147. package/lib/switch/src/switch.min.js +1 -1
  148. package/lib/table/src/body.js +36 -34
  149. package/lib/table/src/body.min.js +1 -1
  150. package/lib/table/src/cell.js +21 -29
  151. package/lib/table/src/cell.min.js +1 -1
  152. package/lib/table/src/columnInfo.js +4 -4
  153. package/lib/table/src/columnInfo.min.js +1 -1
  154. package/lib/table/src/table.js +65 -61
  155. package/lib/table/src/table.min.js +1 -1
  156. package/lib/table/src/util.js +2 -2
  157. package/lib/table/src/util.min.js +1 -1
  158. package/lib/table/style/style.css +160 -139
  159. package/lib/table/style/style.min.css +1 -1
  160. package/lib/textarea/src/textarea.js +6 -6
  161. package/lib/textarea/src/textarea.min.js +1 -1
  162. package/lib/toolbar/src/toolbar.js +20 -22
  163. package/lib/toolbar/src/toolbar.min.js +1 -1
  164. package/lib/toolbar/style/style.css +28 -80
  165. package/lib/toolbar/style/style.min.css +1 -1
  166. package/lib/tools/dom.js +2 -2
  167. package/lib/tools/dom.min.js +1 -1
  168. package/lib/tools/log.js +1 -1
  169. package/lib/tools/log.min.js +1 -1
  170. package/lib/tools/vn.js +13 -0
  171. package/lib/tools/vn.min.js +1 -1
  172. package/lib/tooltip/src/tooltip.js +22 -8
  173. package/lib/tooltip/src/tooltip.min.js +1 -1
  174. package/lib/v-x-e-table/index.js +1 -1
  175. package/lib/v-x-e-table/index.min.js +1 -1
  176. package/lib/v-x-e-table/src/conf.js +43 -38
  177. package/lib/v-x-e-table/src/conf.min.js +1 -1
  178. package/lib/v-x-e-table/src/interceptor.js +1 -1
  179. package/lib/v-x-e-table/src/interceptor.min.js +1 -1
  180. package/lib/v-x-e-table/src/renderer.js +18 -16
  181. package/lib/v-x-e-table/src/renderer.min.js +1 -1
  182. package/lib/v-x-e-table/style/style.css +405 -2
  183. package/lib/v-x-e-table/style/style.min.css +1 -1
  184. package/package.json +6 -6
  185. package/packages/checkbox/src/checkbox.ts +7 -4
  186. package/packages/edit/src/hook.ts +18 -6
  187. package/packages/export/src/export-panel.ts +9 -19
  188. package/packages/filter/src/panel.ts +8 -16
  189. package/packages/form/src/form-config-item.ts +4 -3
  190. package/packages/form/src/form-item.ts +4 -3
  191. package/packages/form/src/form.ts +6 -4
  192. package/packages/grid/src/grid.ts +2 -1
  193. package/packages/input/src/input.ts +3 -3
  194. package/packages/modal/src/modal.ts +5 -4
  195. package/packages/radio/src/radio.ts +4 -3
  196. package/packages/select/src/select.ts +2 -1
  197. package/packages/table/src/cell.ts +18 -35
  198. package/packages/table/src/table.ts +11 -10
  199. package/packages/toolbar/src/toolbar.ts +14 -21
  200. package/packages/tools/vn.ts +10 -0
  201. package/packages/tooltip/src/tooltip.ts +8 -4
  202. package/packages/v-x-e-table/src/conf.ts +43 -38
  203. package/styles/base/checked.scss +44 -148
  204. package/styles/button.scss +1 -43
  205. package/styles/checkbox.scss +6 -65
  206. package/styles/export.scss +2 -9
  207. package/styles/filter.scss +2 -6
  208. package/styles/form.scss +0 -3
  209. package/styles/header.scss +0 -134
  210. package/styles/icon.scss +509 -713
  211. package/styles/input.scss +8 -0
  212. package/styles/modal.scss +0 -1
  213. package/styles/old-icon.scss +713 -0
  214. package/styles/pager.scss +2 -0
  215. package/styles/radio.scss +9 -77
  216. package/styles/select.scss +1 -0
  217. package/styles/table.scss +144 -21
  218. package/styles/toolbar.scss +2 -6
  219. package/styles/variable.scss +5 -5
  220. package/types/all.d.ts +6 -0
  221. package/types/column.d.ts +11 -11
  222. package/types/component.d.ts +3 -1
  223. package/types/form-item.d.ts +1 -0
  224. package/types/form.d.ts +6 -2
  225. package/types/grid.d.ts +4 -4
  226. package/types/table.d.ts +2 -2
  227. package/types/v-x-e-table/renderer.d.ts +3 -2
package/styles/radio.scss CHANGED
@@ -1,6 +1,7 @@
1
1
  /**Variable**/
2
2
  @import './helpers/mixin.scss';
3
3
  @import './base/common.scss';
4
+ @import './base/checked.scss';
4
5
 
5
6
  /*radio-group*/
6
7
  .vxe-radio-group {
@@ -15,13 +16,11 @@
15
16
 
16
17
  /*radio*/
17
18
  .vxe-radio {
19
+ @extend %XERadioIcon;
18
20
  display: inline-block;
19
21
  vertical-align: middle;
20
22
  white-space: nowrap;
21
- user-select: none;
22
23
  line-height: 1;
23
- cursor: pointer;
24
- color: $vxe-font-color;
25
24
  > input {
26
25
  &[type="radio"] {
27
26
  position: absolute;
@@ -30,75 +29,20 @@
30
29
  border: 0;
31
30
  appearance: none;
32
31
  }
33
- &+.vxe-radio--icon {
34
- position: relative;
35
- display: inline-block;
36
- width: 1em;
37
- height: 1em;
38
- border: $vxe-radio-border-width solid $vxe-input-border-color;
39
- background-color: $vxe-radio-icon-background-color;
40
- vertical-align: middle;
41
- border-radius: 50%;
42
- }
43
- &:checked+.vxe-radio--icon {
44
- background-color: $vxe-primary-color;
45
- border-color: $vxe-primary-color;
46
- &:before {
47
- content: "";
48
- position: absolute;
49
- background-color: $vxe-radio-checked-icon-background-color;
50
- border-radius: 50%;
51
- height: 0.25em;
52
- width: 0.25em;
53
- top: 50%;
54
- left: 50%;
55
- transform: translate(-50%,-50%);
56
- }
57
- &+.vxe-radio--label {
58
- color: $vxe-primary-color;
59
- }
60
- }
61
- }
62
- &:not(.is--disabled) {
63
- & > input {
64
- &:focus {
65
- &+.vxe-radio--icon {
66
- border-color: $vxe-primary-color;
67
- box-shadow: 0 0 0.2em 0 $vxe-primary-color;
68
- }
69
- }
70
- }
71
- &:hover {
72
- > input {
73
- &+.vxe-radio--icon {
74
- border-color: $vxe-primary-color;
75
- }
76
- }
77
- }
78
- }
79
- &.is--disabled {
80
- cursor: not-allowed;
81
- > input {
82
- &+.vxe-radio--icon {
83
- border-color: $vxe-input-disabled-color;
84
- background-color: $vxe-input-disabled-background-color;
85
- &:before {
86
- border-color: $vxe-primary-disabled-color;
87
- background-color: $vxe-primary-disabled-color;
88
- }
89
- &+.vxe-radio--label {
90
- color: $vxe-disabled-color;
91
- }
92
- }
93
- }
94
32
  }
95
33
  .vxe-radio--label {
96
- padding-left: 0.5em;
97
34
  vertical-align: middle;
98
35
  display: inline-block;
99
36
  max-width: 50em;
100
37
  @extend %TextEllipsis;
101
38
  }
39
+ &:not(.is--disabled) {
40
+ > input {
41
+ &:focus+.vxe-radio--icon {
42
+ color: $vxe-primary-color;
43
+ }
44
+ }
45
+ }
102
46
  &:not(.vxe-radio-button) {
103
47
  &+.vxe-radio {
104
48
  margin-left: 10px;
@@ -192,25 +136,13 @@
192
136
 
193
137
  .vxe-radio {
194
138
  font-size: $vxe-font-size;
195
- .vxe-radio--icon {
196
- font-size: $vxe-radio-font-size-default;
197
- }
198
139
  &.size--medium {
199
140
  font-size: $vxe-font-size-medium;
200
- .vxe-radio--icon {
201
- font-size: $vxe-radio-font-size-medium;
202
- }
203
141
  }
204
142
  &.size--small {
205
143
  font-size: $vxe-font-size-small;
206
- .vxe-radio--icon {
207
- font-size: $vxe-radio-font-size-small;
208
- }
209
144
  }
210
145
  &.size--mini {
211
146
  font-size: $vxe-font-size-mini;
212
- .vxe-radio--icon {
213
- font-size: $vxe-radio-font-size-mini;
214
- }
215
147
  }
216
148
  }
@@ -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.2em;
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.1em;
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;
@@ -690,23 +826,10 @@
690
826
 
691
827
  // 单选框和复选框
692
828
  .vxe-cell--radio {
693
- @extend %XERadio;
694
- }
695
- .vxe-cell--checkbox {
696
- @extend %XECheckbox;
697
- }
698
- .vxe-cell--radio .vxe-radio--icon,
699
- .vxe-cell--checkbox .vxe-checkbox--icon {
700
- left: 0;
701
- top: 0.1em;
702
- }
703
- .vxe-cell--radio .vxe-radio--label,
704
- .vxe-cell--checkbox .vxe-checkbox--label {
705
- padding-left: 0.5em;
829
+ @extend %XERadioIcon;
706
830
  }
707
- .vxe-cell--radio,
708
831
  .vxe-cell--checkbox {
709
- padding-left: 1.2em;
832
+ @extend %XECheckboxIcon;
710
833
  }
711
834
 
712
835
  .fixed--hidden {
@@ -958,10 +1081,10 @@
958
1081
  }
959
1082
  }
960
1083
  }
961
- .vxe-cell--checkbox .vxe-checkbox--icon {
1084
+ .vxe-cell--checkbox {
962
1085
  font-size: $vxe-checkbox-font-size-medium;
963
1086
  }
964
- .vxe-cell--radio .vxe-radio--icon {
1087
+ .vxe-cell--radio {
965
1088
  font-size: $vxe-radio-font-size-medium;
966
1089
  }
967
1090
  }
@@ -976,10 +1099,10 @@
976
1099
  }
977
1100
  }
978
1101
  }
979
- .vxe-cell--checkbox .vxe-checkbox--icon {
1102
+ .vxe-cell--checkbox {
980
1103
  font-size: $vxe-checkbox-font-size-small;
981
1104
  }
982
- .vxe-cell--radio .vxe-radio--icon {
1105
+ .vxe-cell--radio {
983
1106
  font-size: $vxe-radio-font-size-small;
984
1107
  }
985
1108
  }
@@ -994,10 +1117,10 @@
994
1117
  }
995
1118
  }
996
1119
  }
997
- .vxe-cell--checkbox .vxe-checkbox--icon {
1120
+ .vxe-cell--checkbox {
998
1121
  font-size: $vxe-checkbox-font-size-mini;
999
1122
  }
1000
- .vxe-cell--radio .vxe-radio--icon {
1123
+ .vxe-cell--radio {
1001
1124
  font-size: $vxe-radio-font-size-mini;
1002
1125
  }
1003
1126
  }
@@ -120,7 +120,7 @@
120
120
  & > li {
121
121
  max-width: 16em;
122
122
  min-width: 12.5em;
123
- padding: 0.2em 1em 0.2em 2.3em;
123
+ padding: 0.2em 1em 0.2em 1em;
124
124
  @for $i from 2 through 8 {
125
125
  $interval: $i - 1 + 0.2;
126
126
  &.level--#{$i}{
@@ -170,11 +170,7 @@
170
170
  }
171
171
 
172
172
  .vxe-custom--option {
173
- @extend %XECheckbox;
174
- .vxe-checkbox--icon {
175
- left: 0.6em;
176
- top: 0.38em;
177
- }
173
+ @extend %XECheckboxIcon;
178
174
  }
179
175
 
180
176
  .vxe-toolbar {
@@ -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*/
@@ -142,10 +142,10 @@ $vxe-modal-body-background-color: #fff !default;
142
142
  $vxe-modal-border-color: #ebeef5 !default;
143
143
 
144
144
  /*checkbox*/
145
- $vxe-checkbox-font-size-default: 16px !default;
146
- $vxe-checkbox-font-size-medium: 15px !default;
147
- $vxe-checkbox-font-size-small: 14px !default;
148
- $vxe-checkbox-font-size-mini: 14px !default;
145
+ $vxe-checkbox-font-size-default: 15px !default;
146
+ $vxe-checkbox-font-size-medium: 14px !default;
147
+ $vxe-checkbox-font-size-small: 13px !default;
148
+ $vxe-checkbox-font-size-mini: 12px !default;
149
149
  $vxe-checkbox-checked-width: 0.32em !default;
150
150
  $vxe-checkbox-checked-height: 0.64em !default;
151
151
  $vxe-checkbox-indeterminate-width: 0.6em !default;
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