vxe-table 4.4.1 → 4.4.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/es/button/style.css +27 -27
  2. package/es/checkbox/style.css +11 -11
  3. package/es/export/style.css +12 -12
  4. package/es/filter/style.css +13 -13
  5. package/es/form/style.css +33 -33
  6. package/es/grid/style.css +8 -8
  7. package/es/icon/style.css +10 -10
  8. package/es/input/style.css +82 -82
  9. package/es/list/style.css +1 -1
  10. package/es/loading/style.css +3 -3
  11. package/es/menu/style.css +7 -7
  12. package/es/modal/style.css +20 -20
  13. package/es/pager/style.css +31 -31
  14. package/es/pulldown/style.css +7 -7
  15. package/es/radio/style.css +20 -20
  16. package/es/select/style.css +23 -23
  17. package/es/style.css +1 -1
  18. package/es/style.min.css +1 -1
  19. package/es/switch/style.css +11 -11
  20. package/es/table/src/body.js +1 -1
  21. package/es/table/src/table.js +1 -1
  22. package/es/table/style.css +118 -118
  23. package/es/textarea/style.css +23 -23
  24. package/es/toolbar/style.css +20 -20
  25. package/es/tools/log.js +1 -1
  26. package/es/tooltip/style.css +17 -17
  27. package/es/v-x-e-table/index.js +1 -1
  28. package/es/v-x-e-table/style.css +12 -12
  29. package/es/vxe-button/style.css +27 -27
  30. package/es/vxe-checkbox/style.css +11 -11
  31. package/es/vxe-form/style.css +33 -33
  32. package/es/vxe-grid/style.css +8 -8
  33. package/es/vxe-icon/style.css +9 -9
  34. package/es/vxe-input/style.css +82 -82
  35. package/es/vxe-list/style.css +1 -1
  36. package/es/vxe-loading/style.css +3 -3
  37. package/es/vxe-modal/style.css +20 -20
  38. package/es/vxe-module-export/style.css +12 -12
  39. package/es/vxe-module-filter/style.css +13 -13
  40. package/es/vxe-module-menu/style.css +7 -7
  41. package/es/vxe-pager/style.css +31 -31
  42. package/es/vxe-pulldown/style.css +7 -7
  43. package/es/vxe-radio/style.css +20 -20
  44. package/es/vxe-select/style.css +23 -23
  45. package/es/vxe-switch/style.css +11 -11
  46. package/es/vxe-table/style.css +118 -118
  47. package/es/vxe-textarea/style.css +23 -23
  48. package/es/vxe-toolbar/style.css +20 -20
  49. package/es/vxe-tooltip/style.css +17 -17
  50. package/lib/button/style/style.css +27 -27
  51. package/lib/button/style/style.min.css +1 -1
  52. package/lib/checkbox/style/style.css +11 -11
  53. package/lib/checkbox/style/style.min.css +1 -1
  54. package/lib/export/style/style.css +12 -12
  55. package/lib/export/style/style.min.css +1 -1
  56. package/lib/filter/style/style.css +13 -13
  57. package/lib/filter/style/style.min.css +1 -1
  58. package/lib/form/style/style.css +33 -33
  59. package/lib/form/style/style.min.css +1 -1
  60. package/lib/grid/style/style.css +8 -8
  61. package/lib/grid/style/style.min.css +1 -1
  62. package/lib/icon/style/style.css +10 -10
  63. package/lib/icon/style/style.min.css +10 -10
  64. package/lib/index.umd.js +8 -4
  65. package/lib/index.umd.min.js +1 -1
  66. package/lib/input/style/style.css +82 -82
  67. package/lib/input/style/style.min.css +1 -1
  68. package/lib/list/style/style.css +1 -1
  69. package/lib/list/style/style.min.css +1 -1
  70. package/lib/loading/style/style.css +3 -3
  71. package/lib/loading/style/style.min.css +1 -1
  72. package/lib/menu/style/style.css +7 -7
  73. package/lib/menu/style/style.min.css +1 -1
  74. package/lib/modal/style/style.css +20 -20
  75. package/lib/modal/style/style.min.css +1 -1
  76. package/lib/pager/style/style.css +31 -31
  77. package/lib/pager/style/style.min.css +1 -1
  78. package/lib/pulldown/style/style.css +7 -7
  79. package/lib/pulldown/style/style.min.css +1 -1
  80. package/lib/radio/style/style.css +20 -20
  81. package/lib/radio/style/style.min.css +1 -1
  82. package/lib/select/style/style.css +23 -23
  83. package/lib/select/style/style.min.css +1 -1
  84. package/lib/style.css +1 -1
  85. package/lib/style.min.css +1 -1
  86. package/lib/switch/style/style.css +11 -11
  87. package/lib/switch/style/style.min.css +1 -1
  88. package/lib/table/src/body.js +2 -1
  89. package/lib/table/src/body.min.js +1 -1
  90. package/lib/table/src/table.js +4 -1
  91. package/lib/table/src/table.min.js +1 -1
  92. package/lib/table/style/style.css +118 -118
  93. package/lib/table/style/style.min.css +1 -1
  94. package/lib/textarea/style/style.css +23 -23
  95. package/lib/textarea/style/style.min.css +1 -1
  96. package/lib/toolbar/style/style.css +20 -20
  97. package/lib/toolbar/style/style.min.css +1 -1
  98. package/lib/tools/log.js +1 -1
  99. package/lib/tools/log.min.js +1 -1
  100. package/lib/tooltip/style/style.css +17 -17
  101. package/lib/tooltip/style/style.min.css +1 -1
  102. package/lib/v-x-e-table/index.js +1 -1
  103. package/lib/v-x-e-table/index.min.js +1 -1
  104. package/lib/v-x-e-table/style/style.css +12 -12
  105. package/lib/v-x-e-table/style/style.min.css +1 -1
  106. package/lib/vxe-button/style/style.css +27 -27
  107. package/lib/vxe-button/style/style.min.css +1 -1
  108. package/lib/vxe-checkbox/style/style.css +11 -11
  109. package/lib/vxe-checkbox/style/style.min.css +1 -1
  110. package/lib/vxe-form/style/style.css +33 -33
  111. package/lib/vxe-form/style/style.min.css +1 -1
  112. package/lib/vxe-grid/style/style.css +8 -8
  113. package/lib/vxe-grid/style/style.min.css +1 -1
  114. package/lib/vxe-icon/style/style.css +9 -9
  115. package/lib/vxe-icon/style/style.min.css +1 -1
  116. package/lib/vxe-input/style/style.css +82 -82
  117. package/lib/vxe-input/style/style.min.css +1 -1
  118. package/lib/vxe-list/style/style.css +1 -1
  119. package/lib/vxe-list/style/style.min.css +1 -1
  120. package/lib/vxe-loading/style/style.css +3 -3
  121. package/lib/vxe-loading/style/style.min.css +1 -1
  122. package/lib/vxe-modal/style/style.css +20 -20
  123. package/lib/vxe-modal/style/style.min.css +1 -1
  124. package/lib/vxe-module-export/style/style.css +12 -12
  125. package/lib/vxe-module-export/style/style.min.css +1 -1
  126. package/lib/vxe-module-filter/style/style.css +13 -13
  127. package/lib/vxe-module-filter/style/style.min.css +1 -1
  128. package/lib/vxe-module-menu/style/style.css +7 -7
  129. package/lib/vxe-module-menu/style/style.min.css +1 -1
  130. package/lib/vxe-pager/style/style.css +31 -31
  131. package/lib/vxe-pager/style/style.min.css +1 -1
  132. package/lib/vxe-pulldown/style/style.css +7 -7
  133. package/lib/vxe-pulldown/style/style.min.css +1 -1
  134. package/lib/vxe-radio/style/style.css +20 -20
  135. package/lib/vxe-radio/style/style.min.css +1 -1
  136. package/lib/vxe-select/style/style.css +23 -23
  137. package/lib/vxe-select/style/style.min.css +1 -1
  138. package/lib/vxe-switch/style/style.css +11 -11
  139. package/lib/vxe-switch/style/style.min.css +1 -1
  140. package/lib/vxe-table/style/style.css +118 -118
  141. package/lib/vxe-table/style/style.min.css +1 -1
  142. package/lib/vxe-textarea/style/style.css +23 -23
  143. package/lib/vxe-textarea/style/style.min.css +1 -1
  144. package/lib/vxe-toolbar/style/style.css +20 -20
  145. package/lib/vxe-toolbar/style/style.min.css +1 -1
  146. package/lib/vxe-tooltip/style/style.css +17 -17
  147. package/lib/vxe-tooltip/style/style.min.css +1 -1
  148. package/package.json +2 -2
  149. package/packages/table/src/body.ts +1 -1
  150. package/packages/table/src/table.ts +1 -1
  151. package/styles/button.scss +27 -27
  152. package/styles/checkbox.scss +11 -11
  153. package/styles/cssvar.scss +257 -0
  154. package/styles/export.scss +12 -12
  155. package/styles/filter.scss +13 -13
  156. package/styles/form.scss +31 -31
  157. package/styles/grid.scss +8 -8
  158. package/styles/input.scss +75 -75
  159. package/styles/list.scss +1 -1
  160. package/styles/loading.scss +3 -3
  161. package/styles/menu.scss +7 -7
  162. package/styles/modal.scss +20 -20
  163. package/styles/modules.scss +1 -0
  164. package/styles/old-icon.scss +9 -9
  165. package/styles/pager.scss +31 -31
  166. package/styles/pulldown.scss +7 -7
  167. package/styles/radio.scss +20 -20
  168. package/styles/select.scss +23 -23
  169. package/styles/switch.scss +11 -11
  170. package/styles/table.scss +126 -126
  171. package/styles/textarea.scss +22 -22
  172. package/styles/toolbar.scss +20 -20
  173. package/styles/tooltip.scss +17 -17
  174. package/types/button.d.ts +23 -2
  175. package/types/checkbox-group.d.ts +11 -2
  176. package/types/checkbox.d.ts +11 -2
  177. package/types/colgroup.d.ts +19 -3
  178. package/types/column.d.ts +142 -61
  179. package/types/component.d.ts +7 -2
  180. package/types/form-gather.d.ts +10 -1
  181. package/types/form-item.d.ts +16 -1
  182. package/types/form.d.ts +10 -1
  183. package/types/grid.d.ts +72 -2
  184. package/types/index.d.ts +1 -1
  185. package/types/input.d.ts +11 -2
  186. package/types/list.d.ts +11 -2
  187. package/types/modal.d.ts +40 -2
  188. package/types/optgroup.d.ts +10 -1
  189. package/types/option.d.ts +10 -1
  190. package/types/pager.d.ts +17 -2
  191. package/types/pulldown.d.ts +26 -9
  192. package/types/radio-button.d.ts +11 -2
  193. package/types/radio-group.d.ts +11 -2
  194. package/types/radio.d.ts +11 -2
  195. package/types/select.d.ts +11 -2
  196. package/types/switch.d.ts +11 -2
  197. package/types/table.d.ts +20 -3
  198. package/types/textarea.d.ts +11 -2
  199. package/types/toolbar.d.ts +17 -2
  200. package/types/tooltip.d.ts +11 -2
  201. /package/es/icon/style/{iconfont.1685110524528.ttf → iconfont.1685611928442.ttf} +0 -0
  202. /package/es/icon/style/{iconfont.1685110524528.woff → iconfont.1685611928442.woff} +0 -0
  203. /package/es/icon/style/{iconfont.1685110524528.woff2 → iconfont.1685611928442.woff2} +0 -0
  204. /package/es/{iconfont.1685110524528.ttf → iconfont.1685611928442.ttf} +0 -0
  205. /package/es/{iconfont.1685110524528.woff → iconfont.1685611928442.woff} +0 -0
  206. /package/es/{iconfont.1685110524528.woff2 → iconfont.1685611928442.woff2} +0 -0
  207. /package/lib/icon/style/{iconfont.1685110524528.ttf → iconfont.1685611928442.ttf} +0 -0
  208. /package/lib/icon/style/{iconfont.1685110524528.woff → iconfont.1685611928442.woff} +0 -0
  209. /package/lib/icon/style/{iconfont.1685110524528.woff2 → iconfont.1685611928442.woff2} +0 -0
  210. /package/lib/{iconfont.1685110524528.ttf → iconfont.1685611928442.ttf} +0 -0
  211. /package/lib/{iconfont.1685110524528.woff → iconfont.1685611928442.woff} +0 -0
  212. /package/lib/{iconfont.1685110524528.woff2 → iconfont.1685611928442.woff2} +0 -0
@@ -12,33 +12,33 @@
12
12
  }
13
13
 
14
14
  .vxe-textarea--inner {
15
- border-radius: $vxe-border-radius;
15
+ border-radius: var(--vxe-border-radius);
16
16
  outline: 0;
17
17
  font-size: inherit;
18
18
  padding: 0 0.6em;
19
- color: $vxe-font-color;
19
+ color: var(--vxe-font-color);
20
20
  line-height: inherit;
21
- border: 1px solid $vxe-input-border-color;
22
- background-color: $vxe-textarea-background-color;
21
+ border: 1px solid var(--vxe-input-border-color);
22
+ background-color: var(--vxe-textarea-background-color);
23
23
  display: block;
24
24
  padding: 0.3em 0.6em;
25
25
  &::placeholder {
26
- color: $vxe-input-placeholder-color;
26
+ color: var(--vxe-input-placeholder-color);
27
27
  }
28
28
  &:focus {
29
- border: 1px solid $vxe-primary-color;
29
+ border: 1px solid var(--vxe-primary-color);
30
30
  }
31
31
  &[disabled] {
32
32
  cursor: not-allowed;
33
- background-color: $vxe-input-disabled-background-color;
33
+ background-color: var(--vxe-input-disabled-background-color);
34
34
  }
35
35
  }
36
36
 
37
37
  .vxe-textarea--inner,
38
38
  .vxe-textarea--autosize {
39
- line-height: $vxe-textarea-line-height;
40
- color: $vxe-font-color;
41
- font-family: $vxe-font-family;
39
+ line-height: var(--vxe-textarea-line-height);
40
+ color: var(--vxe-font-color);
41
+ font-family: var(--vxe-font-family);
42
42
  }
43
43
 
44
44
  .vxe-textarea--autosize {
@@ -60,45 +60,45 @@
60
60
  bottom: 0.2em;
61
61
  right: 1.4em;
62
62
  padding-left: 0.2em;
63
- color: $vxe-textarea-count-color;
64
- background-color: $vxe-textarea-count-background-color;
63
+ color: var(--vxe-textarea-count-color);
64
+ background-color: var(--vxe-textarea-count-background-color);
65
65
  &.is--error {
66
- color: $vxe-textarea-count-error-color;
66
+ color: var(--vxe-textarea-count-error-color);
67
67
  }
68
68
  }
69
69
 
70
70
  .vxe-textarea,
71
71
  .vxe-textarea--autosize {
72
- font-size: $vxe-font-size;
72
+ font-size: var(--vxe-font-size);
73
73
  &.size--medium {
74
- font-size: $vxe-font-size-medium;
74
+ font-size: var(--vxe-font-size-medium);
75
75
  }
76
76
  &.size--small {
77
- font-size: $vxe-font-size-small;
77
+ font-size: var(--vxe-font-size-small);
78
78
  }
79
79
  &.size--mini {
80
- font-size: $vxe-font-size-mini;
80
+ font-size: var(--vxe-font-size-mini);
81
81
  }
82
82
  }
83
83
 
84
84
  .vxe-textarea {
85
85
  &:not(.is--autosize) {
86
- min-height: $vxe-input-height-default;
86
+ min-height: var(--vxe-input-height-default);
87
87
  }
88
88
  &.size--medium {
89
- font-size: $vxe-font-size-medium;
89
+ font-size: var(--vxe-font-size-medium);
90
90
  &:not(.is--autosize) {
91
- min-height: $vxe-input-height-medium;
91
+ min-height: var(--vxe-input-height-medium);
92
92
  }
93
93
  }
94
94
  &.size--small {
95
95
  &:not(.is--autosize) {
96
- min-height: $vxe-input-height-small;
96
+ min-height: var(--vxe-input-height-small);
97
97
  }
98
98
  }
99
99
  &.size--mini {
100
100
  &:not(.is--autosize) {
101
- min-height: $vxe-input-height-mini;
101
+ min-height: var(--vxe-input-height-mini);
102
102
  }
103
103
  }
104
104
  }
@@ -8,9 +8,9 @@
8
8
  flex-direction: row;
9
9
  align-items: center;
10
10
  padding: 0.6em 0;
11
- color: $vxe-font-color;
12
- font-family: $vxe-font-family;
13
- background-color: $vxe-toolbar-background-color;
11
+ color: var(--vxe-font-color);
12
+ font-family: var(--vxe-font-family);
13
+ background-color: var(--vxe-toolbar-background-color);
14
14
  &:after {
15
15
  content: "";
16
16
  display: block;
@@ -20,9 +20,9 @@
20
20
  visibility: hidden;
21
21
  }
22
22
  &.is--perfect {
23
- border: 1px solid $vxe-table-border-color;
23
+ border: 1px solid var(--vxe-table-border-color);
24
24
  border-bottom-width: 0;
25
- background-color: $vxe-table-header-background-color;
25
+ background-color: var(--vxe-table-header-background-color);
26
26
  }
27
27
  &.is--loading {
28
28
  &:before {
@@ -32,9 +32,9 @@
32
32
  left: 0;
33
33
  width: 100%;
34
34
  height: 100%;
35
- z-index: $vxe-loading-z-index;
35
+ z-index: var(--vxe-loading-z-index);
36
36
  user-select: none;
37
- background-color: $vxe-loading-background-color;
37
+ background-color: var(--vxe-loading-background-color);
38
38
  }
39
39
  }
40
40
  .vxe-buttons--wrapper {
@@ -83,7 +83,7 @@
83
83
  margin-left: 0.8em;
84
84
  &.is--active {
85
85
  & > .vxe-button {
86
- background-color: $vxe-toolbar-custom-active-background-color;
86
+ background-color: var(--vxe-toolbar-custom-active-background-color);
87
87
  border-radius: 50%;
88
88
  }
89
89
  .vxe-custom--option-wrapper {
@@ -96,22 +96,22 @@
96
96
  position: absolute;
97
97
  right: 2px;
98
98
  text-align: left;
99
- background-color: $vxe-toolbar-panel-background-color;
99
+ background-color: var(--vxe-toolbar-panel-background-color);
100
100
  z-index: 19;
101
- border: 1px solid $vxe-table-border-color;
102
- border-radius: $vxe-border-radius;
101
+ border: 1px solid var(--vxe-table-border-color);
102
+ border-radius: var(--vxe-border-radius);
103
103
  box-shadow: 0 1px 6px rgba(0,0,0,.2);
104
104
  .vxe-custom--header {
105
105
  padding: 0.28em 0;
106
106
  font-weight: 700;
107
- border-bottom: 1px solid $vxe-table-popup-border-color;
107
+ border-bottom: 1px solid var(--vxe-table-popup-border-color);
108
108
  }
109
109
  .vxe-custom--body {
110
110
  padding: 0.2em 0;
111
111
  max-height: 17.6em;
112
112
  .vxe-custom--option {
113
113
  &:hover {
114
- background-color: $vxe-table-row-hover-background-color;
114
+ background-color: var(--vxe-table-row-hover-background-color);
115
115
  }
116
116
  }
117
117
  }
@@ -133,21 +133,21 @@
133
133
  }
134
134
  }
135
135
  .vxe-custom--footer {
136
- border-top: 1px solid $vxe-table-popup-border-color;
136
+ border-top: 1px solid var(--vxe-table-popup-border-color);
137
137
  text-align: right;
138
138
  button {
139
139
  background-color: transparent;
140
140
  width: 50%;
141
141
  height: 2.5em;
142
142
  border: 0;
143
- color: $vxe-font-color;
143
+ color: var(--vxe-font-color);
144
144
  text-align: center;
145
145
  cursor: pointer;
146
146
  &:focus {
147
147
  outline: none;
148
148
  }
149
149
  &:hover {
150
- color: $vxe-primary-color;
150
+ color: var(--vxe-primary-color);
151
151
  }
152
152
  }
153
153
  }
@@ -174,14 +174,14 @@
174
174
  }
175
175
 
176
176
  .vxe-toolbar {
177
- font-size: $vxe-font-size;
177
+ font-size: var(--vxe-font-size);
178
178
  &.size--medium {
179
- font-size: $vxe-font-size-medium;
179
+ font-size: var(--vxe-font-size-medium);
180
180
  }
181
181
  &.size--small {
182
- font-size: $vxe-font-size-small;
182
+ font-size: var(--vxe-font-size-small);
183
183
  }
184
184
  &.size--mini {
185
- font-size: $vxe-font-size-mini;
185
+ font-size: var(--vxe-font-size-mini);
186
186
  }
187
187
  }
@@ -8,13 +8,13 @@
8
8
  left: -100%;
9
9
  font-size: 12px;
10
10
  max-width: 600px;
11
- border-radius: $vxe-border-radius;
11
+ border-radius: var(--vxe-border-radius);
12
12
  padding: 8px 12px;
13
13
  white-space: normal;
14
14
  word-break: break-word;
15
15
  box-shadow: 2px 2px 4px -2px rgba(0,0,0,.2);
16
- color: $vxe-font-color;
17
- font-family: $vxe-font-family;
16
+ color: var(--vxe-font-color);
17
+ font-family: var(--vxe-font-family);
18
18
  &:not(.is--enterable) {
19
19
  pointer-events: none;
20
20
  }
@@ -85,41 +85,41 @@
85
85
  }
86
86
  .vxe-table--tooltip-wrapper {
87
87
  &.theme--light {
88
- background-color: $vxe-tooltip-light-background-color;
89
- border: 1px solid $vxe-input-border-color;
88
+ background-color: var(--vxe-tooltip-light-background-color);
89
+ border: 1px solid var(--vxe-input-border-color);
90
90
  &.placement--top {
91
91
  .vxe-table--tooltip-arrow {
92
- border-top-color: $vxe-input-border-color;
92
+ border-top-color: var(--vxe-input-border-color);
93
93
  &:before {
94
- border-top-color: $vxe-tooltip-light-background-color;
94
+ border-top-color: var(--vxe-tooltip-light-background-color);
95
95
  }
96
96
  }
97
97
  }
98
98
  &.placement--bottom {
99
99
  .vxe-table--tooltip-arrow {
100
- border-bottom-color: $vxe-input-border-color;
100
+ border-bottom-color: var(--vxe-input-border-color);
101
101
  &:before {
102
- border-bottom-color: $vxe-tooltip-light-background-color;
102
+ border-bottom-color: var(--vxe-tooltip-light-background-color);
103
103
  }
104
104
  }
105
105
  }
106
106
  }
107
107
  &.theme--dark {
108
- background: $vxe-tooltip-dark-background-color;
109
- color: $vxe-tooltip-dark-color;
108
+ background: var(--vxe-tooltip-dark-background-color);
109
+ color: var(--vxe-tooltip-dark-color);
110
110
  &.placement--top {
111
111
  .vxe-table--tooltip-arrow {
112
- border-top-color: $vxe-tooltip-dark-background-color;
112
+ border-top-color: var(--vxe-tooltip-dark-background-color);
113
113
  &:before {
114
- border-top-color: $vxe-tooltip-dark-background-color;
114
+ border-top-color: var(--vxe-tooltip-dark-background-color);
115
115
  }
116
116
  }
117
117
  }
118
118
  &.placement--bottom {
119
119
  .vxe-table--tooltip-arrow {
120
- border-bottom-color: $vxe-tooltip-dark-background-color;
120
+ border-bottom-color: var(--vxe-tooltip-dark-background-color);
121
121
  &:before {
122
- border-bottom-color: $vxe-tooltip-dark-background-color;
122
+ border-bottom-color: var(--vxe-tooltip-dark-background-color);
123
123
  }
124
124
  }
125
125
  }
@@ -129,7 +129,7 @@
129
129
  /*valid error*/
130
130
  .vxe-table--tooltip-wrapper {
131
131
  &.vxe-table--valid-error {
132
- background-color: $vxe-tooltip-validate-error-background-color;
133
- color: $vxe-tooltip-validate-error-color;
132
+ background-color: var(--vxe-tooltip-validate-error-background-color);
133
+ color: var(--vxe-tooltip-validate-error-color);
134
134
  }
135
135
  }
package/types/button.d.ts CHANGED
@@ -7,11 +7,11 @@ import { VXEComponent, VxeComponentBase, VxeEvent, SizeType, ValueOf, VNodeStyle
7
7
  * 组件 - 按钮
8
8
  * @example import { VxeButton } from 'vxe-table'
9
9
  */
10
- export const VxeButton: VXEComponent<VxeButtonProps, VxeButtonEventProps>
10
+ export const VxeButton: VXEComponent<VxeButtonProps, VxeButtonEventProps, VxeButtonSlots>
11
11
  /**
12
12
  * 组件 - 按钮
13
13
  */
14
- export const Button: VXEComponent<VxeButtonProps, VxeButtonEventProps>
14
+ export const Button: typeof VxeButton
15
15
 
16
16
  export type VxeButtonInstance = ComponentPublicInstance<VxeButtonProps, VxeButtonConstructor>
17
17
 
@@ -159,3 +159,24 @@ export namespace VxeButtonEvents {
159
159
  export type Click = (params: VxeButtonDefines.ClickEventParams) => void
160
160
  export type DropdownClick = (params: VxeButtonDefines.DropdownClickParams) => void
161
161
  }
162
+
163
+ export interface VxeButtonSlots {
164
+ /**
165
+ * 自定义按钮内容
166
+ */
167
+ default: (params: {
168
+ [key: string]: any
169
+ }) => any
170
+ /**
171
+ * 自定义自定义图标
172
+ */
173
+ icon: (params: {
174
+ [key: string]: any
175
+ }) => any
176
+ /**
177
+ * 自定义下拉按钮
178
+ */
179
+ dropdowns: (params: {
180
+ [key: string]: any
181
+ }) => any
182
+ }
@@ -8,11 +8,11 @@ import { VxeCheckboxPropTypes } from './checkbox'
8
8
  * 组件 - 复选框组
9
9
  * @example import { VxeCheckboxGroup } from 'vxe-table'
10
10
  */
11
- export const VxeCheckboxGroup: VXEComponent<VxeCheckboxGroupProps, VxeCheckboxGroupEventProps>
11
+ export const VxeCheckboxGroup: VXEComponent<VxeCheckboxGroupProps, VxeCheckboxGroupEventProps, VxeCheckboxGroupSlots>
12
12
  /**
13
13
  * 组件 - 复选框组
14
14
  */
15
- export const CheckboxGroup: VXEComponent<VxeCheckboxGroupProps, VxeCheckboxGroupEventProps>
15
+ export const CheckboxGroup: typeof VxeCheckboxGroup
16
16
 
17
17
  export type VxeCheckboxGroupInstance = ComponentPublicInstance<VxeCheckboxGroupProps, VxeCheckboxGroupConstructor>
18
18
 
@@ -88,3 +88,12 @@ export interface VxeCheckboxGroupListeners {
88
88
  export namespace VxeCheckboxGroupEvents {
89
89
  export type Change = (params: VxeCheckboxGroupDefines.ChangeEventParams) => void
90
90
  }
91
+
92
+ export interface VxeCheckboxGroupSlots {
93
+ /**
94
+ * 自定义插槽模板
95
+ */
96
+ [key: string]: ((params: {
97
+ [key: string]: any
98
+ }) => any) | undefined
99
+ }
@@ -7,11 +7,11 @@ import { VXEComponent, VxeComponentBase, VxeEvent, SizeType, ValueOf } from './c
7
7
  * 组件 - 复选框
8
8
  * @example import { VxeCheckbox } from 'vxe-table'
9
9
  */
10
- export const VxeCheckbox: VXEComponent<VxeCheckboxProps, VxeCheckboxEventProps>
10
+ export const VxeCheckbox: VXEComponent<VxeCheckboxProps, VxeCheckboxEventProps, VxeCheckboxSlots>
11
11
  /**
12
12
  * 组件 - 复选框
13
13
  */
14
- export const Checkbox: VXEComponent<VxeCheckboxProps, VxeCheckboxEventProps>
14
+ export const Checkbox: typeof VxeCheckbox
15
15
 
16
16
  export type VxeCheckboxInstance = ComponentPublicInstance<VxeCheckboxProps, VxeCheckboxConstructor>
17
17
 
@@ -99,3 +99,12 @@ export interface VxeCheckboxListeners {
99
99
  export namespace VxeCheckboxEvents {
100
100
  export type Change = (params: VxeCheckboxDefines.ChangeEventParams) => void
101
101
  }
102
+
103
+ export interface VxeCheckboxSlots {
104
+ /**
105
+ * 自定义插槽模板
106
+ */
107
+ [key: string]: ((params: {
108
+ [key: string]: any
109
+ }) => any) | undefined
110
+ }
@@ -1,5 +1,6 @@
1
1
  import { VXEComponent } from './component'
2
- import { VxeColumnPropTypes } from './column'
2
+ import { VxeTableDataRow } from './table'
3
+ import { VxeColumnPropTypes, VxeColumnSlotTypes } from './column'
3
4
 
4
5
  /* eslint-disable no-use-before-define */
5
6
 
@@ -7,11 +8,11 @@ import { VxeColumnPropTypes } from './column'
7
8
  * 组件 - 表格分组列
8
9
  * @example import { VxeColgroup } from 'vxe-table'
9
10
  */
10
- export const VxeColgroup: VXEComponent<VxeColgroupProps>
11
+ export const VxeColgroup: VXEComponent<VxeColgroupProps, VxeColgroupEventProps, VxeColgroupSlots<any>>
11
12
  /**
12
13
  * 组件 - 表格分组列
13
14
  */
14
- export const Colgroup: VXEComponent<VxeColgroupProps>
15
+ export const Colgroup: typeof VxeColgroup
15
16
 
16
17
  export type VxeColgroupProps = {
17
18
  /**
@@ -75,3 +76,18 @@ export type VxeColgroupProps = {
75
76
  */
76
77
  params?: VxeColumnPropTypes.Params
77
78
  }
79
+
80
+ export type VxeColgroupEventProps = {
81
+ //
82
+ }
83
+
84
+ export interface VxeColgroupSlots<D = VxeTableDataRow> {
85
+ /**
86
+ * 自定义表头内容的模板
87
+ */
88
+ header: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
89
+ /**
90
+ * 只对 type=checkbox,radio 有效,自定义标题模板
91
+ */
92
+ title: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
93
+ }
package/types/column.d.ts CHANGED
@@ -10,11 +10,11 @@ import { VxeTooltipPropTypes } from './tooltip'
10
10
  * 组件 - 表格列
11
11
  * @example import { VxeColumn } from 'vxe-table'
12
12
  */
13
- export const VxeColumn: VXEComponent<VxeColumnProps<any>>
13
+ export const VxeColumn: VXEComponent<VxeColumnProps<any>, VxeColumnEventProps, VxeColumnSlots<any>>
14
14
  /**
15
15
  * 组件 - 表格列
16
16
  */
17
- export const Column: VXEComponent<VxeColumnProps<any>>
17
+ export const Column: typeof VxeColumn
18
18
 
19
19
  export namespace VxeColumnPropTypes {
20
20
  export type ColId = string | number
@@ -128,7 +128,7 @@ export namespace VxeColumnPropTypes {
128
128
  export type CellType = 'auto' | 'number' | 'string'
129
129
 
130
130
  export interface CellRender<D = VxeTableDataRow> extends VxeGlobalRendererHandles.RenderOptions {
131
- events?: { [key: string]: (cellParams: DefaultSlotParams<D>, ...args: any[]) => any }
131
+ events?: { [key: string]: (cellParams: VxeColumnSlotTypes.DefaultSlotParams<D>, ...args: any[]) => any }
132
132
  options?: any[]
133
133
  optionProps?: VxeGlobalRendererHandles.RenderOptionProps
134
134
  optionGroups?: any[]
@@ -140,7 +140,7 @@ export namespace VxeColumnPropTypes {
140
140
  * 编辑渲染配置项
141
141
  */
142
142
  export interface EditRender<D = VxeTableDataRow> extends VxeGlobalRendererHandles.RenderOptions {
143
- events?: { [key: string]: (cellParams: EditSlotParams, ...args: any[]) => any }
143
+ events?: { [key: string]: (cellParams: VxeColumnSlotTypes.EditSlotParams, ...args: any[]) => any }
144
144
  enabled?: boolean
145
145
  options?: any[]
146
146
  optionProps?: VxeGlobalRendererHandles.RenderOptionProps
@@ -166,64 +166,48 @@ export namespace VxeColumnPropTypes {
166
166
 
167
167
  export type Params = any
168
168
 
169
- interface FilterSlotParams<D = VxeTableDataRow> {
170
- $panel: VxeFilterPanel
171
- column: {
172
- filters: VxeTableDefines.FilterOption[]
173
- } & VxeTableDefines.ColumnInfo<D>
174
- columnIndex: number
175
- $columnIndex: number
176
- $rowIndex: number
177
- }
178
-
179
- interface EditSlotParams<D = VxeTableDataRow> {
180
- column: VxeTableDefines.ColumnInfo<D>
181
- columnIndex: number
182
- $columnIndex: number
183
- row: D
184
- rowIndex: number
185
- $rowIndex: number
186
- }
187
-
188
- interface FooterSlotParams<D = VxeTableDataRow> {
189
- column: VxeTableDefines.ColumnInfo<D>
190
- columnIndex: number
191
- _columnIndex: number
192
- $columnIndex: number
193
- $rowIndex: number
194
- items: any[]
195
- data: D[][]
196
- }
197
-
198
- interface HeaderSlotParams<D = VxeTableDataRow> extends VxeTableDefines.CellRenderHeaderParams<D> { }
199
-
200
- interface ContentSlotParams<D = VxeTableDataRow> {
201
- column: VxeTableDefines.ColumnInfo<D>
202
- columnIndex: number
203
- $columnIndex: number
204
- row: D
205
- rowIndex: number
206
- $rowIndex: number
207
- isHidden: boolean
208
- fixed: VxeColumnPropTypes.Fixed
209
- type: string
210
- }
211
-
212
- interface DefaultSlotParams<D = VxeTableDataRow> extends VxeTableDefines.CellRenderBodyParams<D> { }
213
-
214
- interface IconSlotParams<D = VxeTableDataRow> extends DefaultSlotParams<D> { }
215
-
216
169
  export type Slots<D = VxeTableDataRow> = {
217
- title?: string | ((params: HeaderSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
218
- radio?: string | ((params: DefaultSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
219
- checkbox?: string | ((params: DefaultSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
220
- default?: string | ((params: DefaultSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
221
- header?: string | ((params: HeaderSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
222
- footer?: string | ((params: FooterSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
223
- content?: string | ((params: ContentSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
224
- filter?: string | ((params: FilterSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
225
- edit?: string | ((params: EditSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
226
- icon?: string | ((params: IconSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
170
+ /**
171
+ * 只对 type=checkbox,radio 有效,自定义标题模板
172
+ */
173
+ title?: string | ((params: VxeColumnSlotTypes.HeaderSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
174
+ /**
175
+ * 只对 type=radio 有效,自定义单选框模板
176
+ */
177
+ radio?: string | ((params: VxeColumnSlotTypes.DefaultSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
178
+ /**
179
+ * 只对 type=checkbox 有效,自定义复选框模板
180
+ */
181
+ checkbox?: string | ((params: VxeColumnSlotTypes.DefaultSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
182
+ /**
183
+ * 自定义显示内容模板
184
+ */
185
+ default?: string | ((params: VxeColumnSlotTypes.DefaultSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
186
+ /**
187
+ * 自定义表头内容的模板
188
+ */
189
+ header?: string | ((params: VxeColumnSlotTypes.HeaderSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
190
+ /**
191
+ * 自定义表尾内容的模板
192
+ */
193
+ footer?: string | ((params: VxeColumnSlotTypes.FooterSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
194
+ /**
195
+ * 只对 type=expand 有效,自定义展开后的内容模板
196
+ */
197
+ content?: string | ((params: VxeColumnSlotTypes.ContentSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
198
+ /**
199
+ * 只对 filter-render 启用时有效,自定义筛选模板
200
+ */
201
+ filter?: string | ((params: VxeColumnSlotTypes.FilterSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
202
+ /**
203
+ * 只对 edit-render 启用时有效,自定义可编辑组件模板
204
+ */
205
+ edit?: string | ((params: VxeColumnSlotTypes.EditSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
206
+ /**
207
+ * 已废弃
208
+ * @deprecated
209
+ */
210
+ icon?: string | ((params: VxeColumnSlotTypes.IconSlotParams<D>) => SlotVNodeType[] | SlotVNodeType) | null
227
211
  }
228
212
  }
229
213
 
@@ -375,3 +359,100 @@ export type VxeColumnProps<D = VxeTableDataRow> = {
375
359
  */
376
360
  params?: VxeColumnPropTypes.Params
377
361
  }
362
+
363
+ export type VxeColumnEventProps = {
364
+ //
365
+ }
366
+
367
+ export namespace VxeColumnSlotTypes {
368
+ export interface FilterSlotParams<D = VxeTableDataRow> {
369
+ $panel: VxeFilterPanel
370
+ column: {
371
+ filters: VxeTableDefines.FilterOption[]
372
+ } & VxeTableDefines.ColumnInfo<D>
373
+ columnIndex: number
374
+ $columnIndex: number
375
+ $rowIndex: number
376
+ }
377
+
378
+ export interface EditSlotParams<D = VxeTableDataRow> {
379
+ column: VxeTableDefines.ColumnInfo<D>
380
+ columnIndex: number
381
+ $columnIndex: number
382
+ row: D
383
+ rowIndex: number
384
+ $rowIndex: number
385
+ }
386
+
387
+ export interface FooterSlotParams<D = VxeTableDataRow> {
388
+ column: VxeTableDefines.ColumnInfo<D>
389
+ columnIndex: number
390
+ _columnIndex: number
391
+ $columnIndex: number
392
+ $rowIndex: number
393
+ items: any[]
394
+ data: D[][]
395
+ }
396
+
397
+ export interface HeaderSlotParams<D = VxeTableDataRow> extends VxeTableDefines.CellRenderHeaderParams<D> { }
398
+
399
+ export interface ContentSlotParams<D = VxeTableDataRow> {
400
+ column: VxeTableDefines.ColumnInfo<D>
401
+ columnIndex: number
402
+ $columnIndex: number
403
+ row: D
404
+ rowIndex: number
405
+ $rowIndex: number
406
+ isHidden: boolean
407
+ fixed: VxeColumnPropTypes.Fixed
408
+ type: string
409
+ }
410
+
411
+ export interface DefaultSlotParams<D = VxeTableDataRow> extends VxeTableDefines.CellRenderBodyParams<D> { }
412
+
413
+ export interface IconSlotParams<D = VxeTableDataRow> extends DefaultSlotParams<D> { }
414
+ }
415
+
416
+ export interface VxeColumnSlots<D = VxeTableDataRow> {
417
+ /**
418
+ * 自定义显示内容模板
419
+ */
420
+ default: (params: VxeColumnSlotTypes.DefaultSlotParams<D>) => any
421
+ /**
422
+ * 自定义表头内容的模板
423
+ */
424
+ header: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
425
+ /**
426
+ * 自定义表尾内容的模板
427
+ */
428
+ footer: (params: VxeColumnSlotTypes.FooterSlotParams<D>) => any
429
+ /**
430
+ * 只对 type=checkbox,radio 有效,自定义标题模板
431
+ */
432
+ title: (params: VxeColumnSlotTypes.HeaderSlotParams<D>) => any
433
+ /**
434
+ * 只对 type=checkbox 有效,自定义复选框模板
435
+ */
436
+ checkbox: (params: VxeColumnSlotTypes.DefaultSlotParams<D>) => any
437
+ /**
438
+ * 只对 type=radio 有效,自定义单选框模板
439
+ */
440
+ radio: (params: VxeColumnSlotTypes.DefaultSlotParams<D>) => any
441
+ /**
442
+ * 只对 type=expand 有效,自定义展开后的内容模板
443
+ */
444
+ content: (params: VxeColumnSlotTypes.ContentSlotParams<D>) => any
445
+ /**
446
+ * 只对 filter-render 启用时有效,自定义筛选模板
447
+ */
448
+ filter: (params: VxeColumnSlotTypes.FilterSlotParams<D>) => any
449
+ /**
450
+ * 只对 edit-render 启用时有效,自定义可编辑组件模板
451
+ */
452
+ edit: (params: VxeColumnSlotTypes.EditSlotParams<D>) => any
453
+ /**
454
+ * 已废弃
455
+ * @deprecated
456
+ */
457
+ icon: (params: VxeColumnSlotTypes.IconSlotParams<D>) => any
458
+ }