vxe-table 4.6.5 → 4.6.6

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 (149) hide show
  1. package/es/button/style.css +6 -6
  2. package/es/checkbox/src/group.js +7 -1
  3. package/es/custom/src/hook.js +1 -0
  4. package/es/custom/src/panel.js +207 -45
  5. package/es/custom/style.css +326 -80
  6. package/es/export/src/export-panel.js +1 -1
  7. package/es/export/src/import-panel.js +1 -1
  8. package/es/icon/style.css +1 -1
  9. package/es/input/style.css +0 -1
  10. package/es/loading/src/loading.js +1 -1
  11. package/es/loading/style.css +1 -1
  12. package/es/locale/lang/en-US.js +18 -7
  13. package/es/locale/lang/es-ES.js +18 -7
  14. package/es/locale/lang/ja-JP.js +18 -6
  15. package/es/locale/lang/pt-BR.js +18 -7
  16. package/es/locale/lang/zh-CN.js +18 -7
  17. package/es/locale/lang/zh-TC.js +18 -7
  18. package/es/modal/src/modal.js +1 -1
  19. package/es/radio/src/group.js +7 -1
  20. package/es/style.css +1 -1
  21. package/es/style.min.css +1 -1
  22. package/es/table/src/columnInfo.js +3 -3
  23. package/es/table/src/table.js +60 -36
  24. package/es/table/style.css +4 -4
  25. package/es/tools/log.js +1 -1
  26. package/es/v-x-e-table/index.js +1 -1
  27. package/es/v-x-e-table/style.css +1 -1
  28. package/es/vxe-button/style.css +6 -6
  29. package/es/vxe-input/style.css +0 -1
  30. package/es/vxe-loading/style.css +1 -1
  31. package/es/vxe-table/style.css +4 -4
  32. package/es/vxe-table-custom-module/style.css +326 -80
  33. package/lib/button/style/style.css +6 -6
  34. package/lib/button/style/style.min.css +1 -1
  35. package/lib/checkbox/src/group.js +7 -1
  36. package/lib/checkbox/src/group.min.js +1 -1
  37. package/lib/custom/src/hook.js +1 -0
  38. package/lib/custom/src/hook.min.js +1 -1
  39. package/lib/custom/src/panel.js +185 -30
  40. package/lib/custom/src/panel.min.js +1 -1
  41. package/lib/custom/style/style.css +326 -80
  42. package/lib/custom/style/style.min.css +1 -1
  43. package/lib/export/src/export-panel.js +1 -1
  44. package/lib/export/src/export-panel.min.js +1 -1
  45. package/lib/export/src/import-panel.js +1 -1
  46. package/lib/export/src/import-panel.min.js +1 -1
  47. package/lib/icon/style/style.css +1 -1
  48. package/lib/icon/style/style.min.css +1 -1
  49. package/lib/index.umd.js +288 -84
  50. package/lib/index.umd.min.js +1 -1
  51. package/lib/input/style/style.css +0 -1
  52. package/lib/input/style/style.min.css +1 -1
  53. package/lib/loading/src/loading.js +1 -1
  54. package/lib/loading/src/loading.min.js +1 -1
  55. package/lib/loading/style/style.css +1 -1
  56. package/lib/loading/style/style.min.css +1 -1
  57. package/lib/locale/lang/en-US.js +18 -7
  58. package/lib/locale/lang/en-US.min.js +1 -1
  59. package/lib/locale/lang/en-US.umd.js +18 -7
  60. package/lib/locale/lang/es-ES.js +18 -7
  61. package/lib/locale/lang/es-ES.min.js +1 -1
  62. package/lib/locale/lang/es-ES.umd.js +18 -7
  63. package/lib/locale/lang/ja-JP.js +18 -6
  64. package/lib/locale/lang/ja-JP.min.js +1 -1
  65. package/lib/locale/lang/ja-JP.umd.js +18 -6
  66. package/lib/locale/lang/pt-BR.js +18 -7
  67. package/lib/locale/lang/pt-BR.min.js +1 -1
  68. package/lib/locale/lang/pt-BR.umd.js +18 -7
  69. package/lib/locale/lang/zh-CN.js +18 -7
  70. package/lib/locale/lang/zh-CN.min.js +1 -1
  71. package/lib/locale/lang/zh-CN.umd.js +18 -7
  72. package/lib/locale/lang/zh-HK.min.js +1 -1
  73. package/lib/locale/lang/zh-HK.umd.js +18 -7
  74. package/lib/locale/lang/zh-MO.min.js +1 -1
  75. package/lib/locale/lang/zh-MO.umd.js +18 -7
  76. package/lib/locale/lang/zh-TC.js +18 -7
  77. package/lib/locale/lang/zh-TC.min.js +1 -1
  78. package/lib/locale/lang/zh-TC.umd.js +18 -7
  79. package/lib/locale/lang/zh-TW.min.js +1 -1
  80. package/lib/locale/lang/zh-TW.umd.js +18 -7
  81. package/lib/modal/src/modal.js +1 -1
  82. package/lib/modal/src/modal.min.js +1 -1
  83. package/lib/radio/src/group.js +7 -1
  84. package/lib/radio/src/group.min.js +1 -1
  85. package/lib/style.css +1 -1
  86. package/lib/style.min.css +1 -1
  87. package/lib/table/src/columnInfo.js +3 -3
  88. package/lib/table/src/columnInfo.min.js +1 -1
  89. package/lib/table/src/table.js +61 -36
  90. package/lib/table/src/table.min.js +1 -1
  91. package/lib/table/style/style.css +4 -4
  92. package/lib/table/style/style.min.css +1 -1
  93. package/lib/tools/log.js +1 -1
  94. package/lib/tools/log.min.js +1 -1
  95. package/lib/v-x-e-table/index.js +1 -1
  96. package/lib/v-x-e-table/index.min.js +1 -1
  97. package/lib/v-x-e-table/style/style.css +1 -1
  98. package/lib/v-x-e-table/style/style.min.css +1 -1
  99. package/lib/vxe-button/style/style.css +6 -6
  100. package/lib/vxe-button/style/style.min.css +1 -1
  101. package/lib/vxe-input/style/style.css +0 -1
  102. package/lib/vxe-input/style/style.min.css +1 -1
  103. package/lib/vxe-loading/style/style.css +1 -1
  104. package/lib/vxe-loading/style/style.min.css +1 -1
  105. package/lib/vxe-table/style/style.css +4 -4
  106. package/lib/vxe-table/style/style.min.css +1 -1
  107. package/lib/vxe-table-custom-module/style/style.css +326 -80
  108. package/lib/vxe-table-custom-module/style/style.min.css +1 -1
  109. package/package.json +1 -1
  110. package/packages/checkbox/src/group.ts +8 -1
  111. package/packages/custom/src/hook.ts +1 -0
  112. package/packages/custom/src/panel.ts +213 -45
  113. package/packages/export/src/export-panel.ts +1 -1
  114. package/packages/export/src/import-panel.ts +1 -1
  115. package/packages/loading/src/loading.ts +1 -1
  116. package/packages/locale/lang/en-US.ts +18 -7
  117. package/packages/locale/lang/es-ES.ts +18 -7
  118. package/packages/locale/lang/ja-JP.ts +18 -6
  119. package/packages/locale/lang/pt-BR.ts +18 -7
  120. package/packages/locale/lang/zh-CN.ts +18 -7
  121. package/packages/locale/lang/zh-TC.ts +18 -7
  122. package/packages/modal/src/modal.ts +1 -1
  123. package/packages/radio/src/group.ts +8 -1
  124. package/packages/table/src/columnInfo.ts +9 -6
  125. package/packages/table/src/table.ts +62 -39
  126. package/packages/table/src/util.ts +1 -1
  127. package/styles/base/common.scss +4 -4
  128. package/styles/button.scss +5 -5
  129. package/styles/custom.scss +192 -86
  130. package/styles/helpers/mixin.scss +1 -1
  131. package/styles/input.scss +1 -2
  132. package/styles/loading.scss +1 -1
  133. package/styles/modal.scss +2 -2
  134. package/styles/select.scss +1 -1
  135. package/styles/table.scss +2 -2
  136. package/types/table.d.ts +32 -22
  137. package/types/v-x-e-table/renderer.d.ts +1 -0
  138. /package/es/icon/style/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  139. /package/es/icon/style/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  140. /package/es/icon/style/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
  141. /package/es/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  142. /package/es/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  143. /package/es/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
  144. /package/lib/icon/style/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  145. /package/lib/icon/style/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  146. /package/lib/icon/style/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
  147. /package/lib/{iconfont.1714102086168.ttf → iconfont.1714295309081.ttf} +0 -0
  148. /package/lib/{iconfont.1714102086168.woff → iconfont.1714295309081.woff} +0 -0
  149. /package/lib/{iconfont.1714102086168.woff2 → iconfont.1714295309081.woff2} +0 -0
@@ -1,5 +1,6 @@
1
1
  /**Variable**/
2
2
  @import './helpers/mixin.scss';
3
+ @import './base/common.scss';
3
4
 
4
5
  .vxe-table-custom--option {
5
6
  display: flex;
@@ -20,60 +21,64 @@
20
21
  &.is--active {
21
22
  display: block;
22
23
  }
23
- .vxe-table-custom--header,
24
- .vxe-table-custom--body {
25
- list-style-type: none;
26
- overflow-x: hidden;
27
- overflow-y: auto;
28
- margin: 0;
29
- padding: 0;
30
- user-select: none;
31
- & > li {
32
- max-width: 18em;
33
- min-width: 14em;
34
- padding: 0.2em 1em 0.2em 1em;
35
- @for $i from 2 through 8 {
36
- $interval: $i - 1 + 0.2;
37
- &.level--#{$i}{
38
- padding-left: #{$interval + 2.3}em;
39
- .vxe-checkbox--icon {
40
- left: #{$interval + 0.6}em;
41
- }
24
+ }
25
+
26
+ .vxe-table-custom--header,
27
+ .vxe-table-custom--body {
28
+ list-style-type: none;
29
+ overflow-x: hidden;
30
+ overflow-y: auto;
31
+ margin: 0;
32
+ padding: 0;
33
+ user-select: none;
34
+ & > li {
35
+ max-width: 18em;
36
+ min-width: 14em;
37
+ padding: 0.2em 1em 0.2em 1em;
38
+ @for $i from 2 through 8 {
39
+ $interval: $i - 1 + 0.2;
40
+ &.level--#{$i}{
41
+ padding-left: #{$interval + 2.3}em;
42
+ .vxe-checkbox--icon {
43
+ left: #{$interval + 0.6}em;
42
44
  }
43
45
  }
44
46
  }
45
47
  }
46
- .vxe-table-custom--header {
47
- padding: 0.28em 0;
48
- font-weight: 700;
49
- border-bottom: 1px solid var(--vxe-table-popup-border-color);
50
- }
51
- .vxe-table-custom--body {
52
- padding: 0.2em 0;
53
- max-height: 20em;
54
- .vxe-table-custom--checkbox-option {
55
- &:hover {
56
- background-color: var(--vxe-table-row-hover-background-color);
57
- }
48
+ }
49
+
50
+ .vxe-table-custom--header {
51
+ padding: 0.28em 0;
52
+ font-weight: 700;
53
+ border-bottom: 1px solid var(--vxe-table-popup-border-color);
54
+ }
55
+
56
+ .vxe-table-custom--body {
57
+ padding: 0.2em 0;
58
+ max-height: 20em;
59
+ .vxe-table-custom--checkbox-option {
60
+ &:hover {
61
+ background-color: var(--vxe-table-row-hover-background-color);
58
62
  }
59
63
  }
60
- .vxe-table-custom--footer {
61
- border-top: 1px solid var(--vxe-table-popup-border-color);
62
- text-align: right;
63
- button {
64
- background-color: transparent;
65
- width: 50%;
66
- height: 2.5em;
67
- border: 0;
68
- color: var(--vxe-font-color);
69
- text-align: center;
70
- cursor: pointer;
71
- &:focus {
72
- outline: none;
73
- }
74
- &:hover {
75
- color: var(--vxe-primary-color);
76
- }
64
+ }
65
+
66
+ .vxe-table-custom--footer {
67
+ border-top: 1px solid var(--vxe-table-popup-border-color);
68
+ text-align: right;
69
+ button {
70
+ background-color: transparent;
71
+ width: 50%;
72
+ height: 2.5em;
73
+ border: 0;
74
+ color: var(--vxe-font-color);
75
+ text-align: center;
76
+ cursor: pointer;
77
+ &:focus {
78
+ outline: none;
79
+ }
80
+ &:hover {
81
+ color: var(--vxe-primary-color);
77
82
  }
78
83
  }
79
84
  }
@@ -92,46 +97,31 @@
92
97
  display: flex;
93
98
  flex-direction: row;
94
99
  align-items: center;
95
- .vxe-table-custom--fixed-left-option,
96
- .vxe-table-custom--fixed-right-option {
97
- line-height: 1.34em;
98
- font-size: 1.1em;
99
- padding: 0 0.2em;
100
- cursor: pointer;
101
- &.is--checked,
102
- &:hover {
103
- color: var(--vxe-primary-color);
104
- }
105
- &.is--disabled {
106
- cursor: no-drop;
107
- color: var(--vxe-input-disabled-color);
108
- }
100
+ }
101
+
102
+ .vxe-table-custom--fixed-left-option,
103
+ .vxe-table-custom--fixed-right-option {
104
+ line-height: 1.34em;
105
+ font-size: 1.1em;
106
+ padding: 0 0.2em;
107
+ cursor: pointer;
108
+ &.is--checked,
109
+ &:hover {
110
+ color: var(--vxe-primary-color);
111
+ }
112
+ &.is--disabled {
113
+ cursor: no-drop;
114
+ color: var(--vxe-input-disabled-color);
109
115
  }
110
116
  }
111
117
 
112
118
  .vxe-table-custom-popup--body {
113
119
  overflow: auto;
114
120
  height: 100%;
115
- border: 1px solid var(--vxe-table-border-color);
116
- .vxe-table-custom-popup--name {
117
- max-width: 360px;
118
- overflow: hidden;
119
- text-overflow: ellipsis;
120
- white-space: nowrap;
121
- }
122
- @for $index from 2 to 10 {
123
- $paddingLeft: ($index - 1) * 24px;
124
- .vxe-table-custom-popup--row-level#{$index} {
125
- .vxe-table-custom-popup--name {
126
- padding-left: $paddingLeft;
127
- max-width: 260px - $paddingLeft;
128
- }
129
- }
130
- }
131
- .vxe-table-custom-popup--column-visible,
132
- .vxe-table-custom-popup--column-fixed {
133
- text-align: center;
134
- }
121
+ }
122
+
123
+ .vxe-table-custom-popup--table-wrapper {
124
+ border-bottom: 1px solid var(--vxe-table-border-color);
135
125
  table {
136
126
  width: 100%;
137
127
  border: 0;
@@ -141,16 +131,15 @@
141
131
  position: sticky;
142
132
  top: 0;
143
133
  text-align: left;
134
+ border-top: 1px solid var(--vxe-table-border-color);
144
135
  border-bottom: 1px solid var(--vxe-table-border-color);
145
136
  border-left: 1px solid var(--vxe-table-border-color);
146
137
  background-color: var(--vxe-table-header-background-color);
138
+ z-index: 7;
147
139
  }
148
140
  td {
149
141
  border-top: 1px solid var(--vxe-table-border-color);
150
142
  border-left: 1px solid var(--vxe-table-border-color);
151
- &:nth-child(2) {
152
- text-align: center;
153
- }
154
143
  }
155
144
  tr {
156
145
  &:first-child {
@@ -163,6 +152,123 @@
163
152
  td {
164
153
  height: 44px;
165
154
  padding: 0 0.6em;
155
+ &:last-child {
156
+ border-right: 1px solid var(--vxe-table-border-color);
157
+ }
158
+ }
159
+ }
160
+ }
161
+
162
+ .vxe-table-custom-popup--drag-hint {
163
+ @extend %TextEllipsis;
164
+ display: none;
165
+ position: absolute;
166
+ top: 0;
167
+ left: 0;
168
+ padding: 0.6em 1em 0.6em 1.8em;
169
+ max-width: 300px;
170
+ border-radius: var(--vxe-border-radius);
171
+ user-select: none;
172
+ pointer-events: none;
173
+ background-color: var(--vxe-table-body-background-color);
174
+ box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);
175
+ z-index: 33;
176
+ }
177
+
178
+ .vxe-table-custom-popup--name {
179
+ max-width: 360px;
180
+ overflow: hidden;
181
+ text-overflow: ellipsis;
182
+ white-space: nowrap;
183
+ }
184
+
185
+ @for $index from 2 to 10 {
186
+ $paddingLeft: ($index - 1) * 24px;
187
+ .vxe-table-custom-popup--row {
188
+ &.level--#{$index} {
189
+ .vxe-table-custom-popup--name {
190
+ padding-left: $paddingLeft;
191
+ max-width: 260px - $paddingLeft;
192
+ }
193
+ }
194
+ }
195
+ }
196
+
197
+ .vxe-table-custom-popup--column-item {
198
+ position: relative;
199
+ &.col--sort,
200
+ &.col--visible,
201
+ &.col--fixed {
202
+ text-align: center;
203
+ }
204
+ }
205
+
206
+ .vxe-table-custom-popup--row {
207
+ &.active--drag-target {
208
+ &[drag-pos="top"] {
209
+ .vxe-table-custom-popup--column-item {
210
+ &::after {
211
+ display: block;
212
+ top: -2px;
213
+ }
214
+ }
215
+ }
216
+ &[drag-pos="bottom"] {
217
+ .vxe-table-custom-popup--column-item {
218
+ &::after {
219
+ display: block;
220
+ bottom: -2px;
221
+ }
222
+ }
223
+ }
224
+ }
225
+ &:first-child {
226
+ &[drag-pos="top"] {
227
+ .vxe-table-custom-popup--column-item {
228
+ &::after {
229
+ top: 0;
230
+ }
231
+ }
232
+ }
233
+ }
234
+ &:last-child {
235
+ &[drag-pos="bottom"] {
236
+ .vxe-table-custom-popup--column-item {
237
+ &::after {
238
+ bottom: 0;
239
+ }
240
+ }
166
241
  }
167
242
  }
168
- }
243
+ }
244
+
245
+ .vxe-table-custom-popup--column-item {
246
+ &::after {
247
+ display: none;
248
+ content: "";
249
+ position: absolute;
250
+ left: -1px;
251
+ width: calc(100% + 1px);
252
+ height: 3px;
253
+ background-color: var(--vxe-primary-color);
254
+ z-index: 12;
255
+ }
256
+ &:last-child {
257
+ &::after {
258
+ width: 100%;
259
+ }
260
+ }
261
+ }
262
+
263
+ .vxe-table-custom--flip-move {
264
+ transition: transform 0.35s;
265
+ }
266
+
267
+ .vxe-table-custom-popup--column-sort-btn {
268
+ font-size: 1.2em;
269
+ padding: 0.2em 0.5em;
270
+ cursor: grab;
271
+ &:active {
272
+ cursor: grabbing;
273
+ }
274
+ }
@@ -1,4 +1,4 @@
1
- @mixin animatTransition ($property, $duration: .1s, $func: ease-in-out) {
1
+ @mixin createAnimationTransition ($property, $duration: .1s, $func: ease-in-out) {
2
2
  transition: $property $duration $func;
3
3
  }
4
4
 
package/styles/input.scss CHANGED
@@ -272,7 +272,7 @@ $iconWidth: 1.6em;
272
272
  align-items: center;
273
273
  justify-content: center;
274
274
  .vxe-input--panel-icon {
275
- @include animatTransition(transform, .2s);
275
+ @include createAnimationTransition(transform, .2s);
276
276
  }
277
277
  }
278
278
 
@@ -463,7 +463,6 @@ $iconWidth: 1.6em;
463
463
  }
464
464
  .vxe-input--date-picker-label,
465
465
  .vxe-input--date-picker-btn {
466
- display: inline-block;
467
466
  display: flex;
468
467
  align-items: center;
469
468
  justify-content: center;
@@ -15,7 +15,7 @@
15
15
  display: block;
16
16
  }
17
17
  & > .vxe-loading--chunk,
18
- & > .vxe-loading--warpper {
18
+ & > .vxe-loading--wrapper {
19
19
  width: 100%;
20
20
  position: absolute;
21
21
  top: 50%;
package/styles/modal.scss CHANGED
@@ -82,13 +82,13 @@
82
82
  &.is--animat {
83
83
  &.is--mask {
84
84
  &:before {
85
- @include animatTransition(background-color, .2s);
85
+ @include createAnimationTransition(background-color, .2s);
86
86
  }
87
87
  }
88
88
  &.type--message {
89
89
  .vxe-modal--box {
90
90
  &:not(.is--drag) {
91
- @include animatTransition(all, .4s, ease-out);
91
+ @include createAnimationTransition(all, .4s, ease-out);
92
92
  }
93
93
  }
94
94
  }
@@ -30,7 +30,7 @@
30
30
  width: 100%;
31
31
  .vxe-input--suffix-icon {
32
32
  display: inline-block;
33
- @include animatTransition(transform, .2s);
33
+ @include createAnimationTransition(transform, .2s);
34
34
  }
35
35
  }
36
36
  &.is--active {
package/styles/table.scss CHANGED
@@ -1210,7 +1210,7 @@
1210
1210
 
1211
1211
  }
1212
1212
  }
1213
- &.vaild-msg--single {
1213
+ &.valid-msg--single {
1214
1214
  .vxe-body--row {
1215
1215
  &:last-child {
1216
1216
  .vxe-cell--valid-error-hint {
@@ -1224,7 +1224,7 @@
1224
1224
  }
1225
1225
  }
1226
1226
  }
1227
- &.vaild-msg--full {
1227
+ &.valid-msg--full {
1228
1228
  .vxe-body--row {
1229
1229
  &:last-child {
1230
1230
  .vxe-cell--valid-error-hint {
package/types/table.d.ts CHANGED
@@ -240,7 +240,7 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
240
240
  * 用于 edit-config,判断行是否为新增的临时数据
241
241
  * @param row 指定行
242
242
  */
243
- isInsertByRow(row: any): boolean
243
+ isInsertByRow(row: any | null): boolean
244
244
  /**
245
245
  * 删除所有新增的临时数据
246
246
  */
@@ -250,7 +250,7 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
250
250
  * @param row 指定行
251
251
  * @param field 指定字段
252
252
  */
253
- isUpdateByRow(row: any, field?: string): boolean
253
+ isUpdateByRow(row: any, field?: string | null): boolean
254
254
  /**
255
255
  * 获取表格的可视列,也可以指定索引获取列
256
256
  * @param columnIndex 列索引
@@ -261,12 +261,12 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
261
261
  * 根据列的唯一主键获取列
262
262
  * @param colid 列主键
263
263
  */
264
- getColumnById(colid: string): VxeTableDefines.ColumnInfo<DT> | null
264
+ getColumnById(colid: string | null): VxeTableDefines.ColumnInfo<DT> | null
265
265
  /**
266
266
  * 根据列的字段名获取列
267
267
  * @param field 字段名
268
268
  */
269
- getColumnByField(field: string): VxeTableDefines.ColumnInfo<DT> | null
269
+ getColumnByField(field: string | null): VxeTableDefines.ColumnInfo<DT> | null
270
270
  /**
271
271
  * 获取当前表格的列
272
272
  * 收集到的全量列、全量表头列、处理条件之后的全量表头列、当前渲染中的表头列
@@ -294,12 +294,12 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
294
294
  * 根据行的唯一主键获取行
295
295
  * @param rowid 行主键
296
296
  */
297
- getRowById(rowid: string | number): DT | null
297
+ getRowById(rowid: string | number | null): DT | null
298
298
  /**
299
299
  * 根据行获取行的唯一主键
300
300
  * @param row 行对象
301
301
  */
302
- getRowid(row: any): string
302
+ getRowid(row: any | null): string
303
303
  /**
304
304
  * 获取当前表格的数据
305
305
  * 完整的全量表体数据、处理条件之后的全量表体数据、当前渲染中的表体数据、当前渲染中的表尾数据
@@ -355,8 +355,9 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
355
355
  /**
356
356
  * 刷新列配置
357
357
  * 对于动态修改属性、显示/隐藏列等场景下可能会用到
358
+ * 如果传 true 则会检查列顺序并排序
358
359
  */
359
- refreshColumn(): Promise<void>
360
+ refreshColumn(resiveOrder?: boolean): Promise<void>
360
361
  /**
361
362
  * 刷新滚动操作,手动同步滚动相关位置
362
363
  * 对于某些特殊的操作,比如滚动条错位、固定列不同步
@@ -448,7 +449,7 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
448
449
  * 用于 type=radio,判断单选行数据是否勾选
449
450
  * @param row 指定行
450
451
  */
451
- isCheckedByRadioRow(row: any): boolean
452
+ isCheckedByRadioRow(row: any | null): boolean
452
453
  /**
453
454
  * 用于 type=radio,设置某一行为选中状态
454
455
  * @param row 指定行
@@ -550,17 +551,17 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
550
551
  * 已废弃,请使用 isActiveFilterByColumn
551
552
  * @deprecated
552
553
  */
553
- isFilter(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any>): boolean
554
+ isFilter(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any> | null): boolean
554
555
  /**
555
556
  * 判断指定列是否为筛选状态,如果为空则判断所有列
556
557
  * @param columnOrField 列对象或字段名
557
558
  */
558
- isActiveFilterByColumn(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any>): boolean
559
+ isActiveFilterByColumn(fieldOrColumn: VxeColumnPropTypes.Field | VxeTableDefines.ColumnInfo<any> | null): boolean
559
560
  /**
560
561
  * 用于 expand-config.lazy,用于懒加载展开行,判断展开行是否懒加载完成
561
562
  * @param row 指定行
562
563
  */
563
- isRowExpandLoaded(row: any): boolean
564
+ isRowExpandLoaded(row: any | null): boolean
564
565
  /**
565
566
  * 用于 expand-config.lazy,手动清空懒加载展开行的状态,数据会恢复成未展开的状态,当再次展开时会重新加载
566
567
  */
@@ -595,11 +596,11 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
595
596
  * 用于 expand-config,判断行是否为展开状态
596
597
  * @param row 指定行
597
598
  */
598
- isRowExpandByRow(row: any): boolean
599
+ isRowExpandByRow(row: any | null): boolean
599
600
  /**
600
601
  * @deprecated 已废弃,请使用 isRowExpandByRow
601
602
  */
602
- isExpandByRow(row: any): boolean
603
+ isExpandByRow(row: any | null): boolean
603
604
  /**
604
605
  * 用于 type=expand,手动清空展开行状态,数据会恢复成未展开的状态
605
606
  */
@@ -620,7 +621,7 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
620
621
  /**
621
622
  * 用于 tree-config.lazy,用于懒加载树表格,判断树节点是否懒加载完成
622
623
  */
623
- isTreeExpandLoaded(row: any): boolean
624
+ isTreeExpandLoaded(row: any | null): boolean
624
625
  /**
625
626
  * 用于 tree-config.lazy,手动清空懒加载树节点的状态,数据会恢复成未展开的状态,当再次展开时会重新加载
626
627
  */
@@ -655,7 +656,7 @@ export interface TablePublicMethods<DT = VxeTableDataRow> {
655
656
  * 用于 tree-config,判断行是否为树形节点展开状态
656
657
  * @param row 指定行
657
658
  */
658
- isTreeExpandByRow(row: any): boolean
659
+ isTreeExpandByRow(row: any | null): boolean
659
660
  /**
660
661
  * 用于 tree-config,手动清空树形节点的展开状态,数据会恢复成未展开的状态
661
662
  */
@@ -891,6 +892,7 @@ export interface TableReactData<D = VxeTableDataRow> {
891
892
  },
892
893
  // 自定义列相关的信息
893
894
  customStore: VxeTableCustomStoreObj,
895
+ customColumnList: VxeTableDefines.ColumnInfo<D>[]
894
896
  // 当前选中的筛选列
895
897
  filterStore: {
896
898
  isAllSelected: boolean
@@ -1035,6 +1037,13 @@ export interface VxeTableCustomStoreObj {
1035
1037
  maxHeight: number
1036
1038
  }
1037
1039
 
1040
+ export interface VxeTableCustomStorageObj {
1041
+ visible?: boolean
1042
+ resizable?: boolean
1043
+ fixed?: boolean
1044
+ sort?: boolean
1045
+ }
1046
+
1038
1047
  export interface TableInternalData<D = VxeTableDataRow> {
1039
1048
  tZindex: number
1040
1049
  elemStore: {
@@ -1450,12 +1459,7 @@ export namespace VxeTablePropTypes {
1450
1459
  /**
1451
1460
  * 是否启用 localStorage 本地保存,会将列操作状态保留在本地(需要有 id)
1452
1461
  */
1453
- storage?: boolean | {
1454
- visible?: boolean
1455
- resizable?: boolean
1456
- fixed?: boolean
1457
- order?: boolean
1458
- }
1462
+ storage?: boolean | VxeTableCustomStorageObj
1459
1463
  mode?: 'simple' | 'popup' | '' | null
1460
1464
  trigger?: string,
1461
1465
  immediate?: boolean
@@ -2954,9 +2958,15 @@ export namespace VxeTableDefines {
2954
2958
  checked: boolean
2955
2959
  halfChecked: boolean
2956
2960
  disabled: boolean
2961
+
2962
+ // 数据排序
2957
2963
  order: VxeTablePropTypes.SortOrder
2958
2964
  sortTime: number
2959
- customOrder: number
2965
+
2966
+ // 列排序
2967
+ sortNumber: number
2968
+ renderSortNumber: number
2969
+
2960
2970
  renderWidth: number
2961
2971
  renderHeight: number
2962
2972
  resizeWidth: number
@@ -248,6 +248,7 @@ export namespace VxeGlobalRendererHandles {
248
248
  export interface RenderOptionProps {
249
249
  value?: string
250
250
  label?: string
251
+ disabled?: string
251
252
  key?: string
252
253
  }
253
254