vxe-table 3.15.38 → 3.15.40

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 (179) hide show
  1. package/es/grid/src/grid.js +73 -49
  2. package/es/{iconfont.1749796837661.ttf → iconfont.1750082820248.ttf} +0 -0
  3. package/es/iconfont.1750082820248.woff +0 -0
  4. package/es/iconfont.1750082820248.woff2 +0 -0
  5. package/es/index.css +1 -1
  6. package/es/index.min.css +1 -1
  7. package/es/locale/lang/ar-EG.js +6 -0
  8. package/es/locale/lang/de-DE.js +6 -0
  9. package/es/locale/lang/en-US.js +6 -0
  10. package/es/locale/lang/es-ES.js +6 -0
  11. package/es/locale/lang/fr-FR.js +6 -0
  12. package/es/locale/lang/hu-HU.js +6 -0
  13. package/es/locale/lang/hy-AM.js +6 -0
  14. package/es/locale/lang/id-ID.js +6 -0
  15. package/es/locale/lang/it-IT.js +6 -0
  16. package/es/locale/lang/ja-JP.js +6 -0
  17. package/es/locale/lang/ko-KR.js +6 -0
  18. package/es/locale/lang/ms-MY.js +6 -0
  19. package/es/locale/lang/nb-NO.js +6 -0
  20. package/es/locale/lang/pt-BR.js +6 -0
  21. package/es/locale/lang/ru-RU.js +6 -0
  22. package/es/locale/lang/th-TH.js +6 -0
  23. package/es/locale/lang/ug-CN.js +6 -0
  24. package/es/locale/lang/uk-UA.js +6 -0
  25. package/es/locale/lang/uz-UZ.js +6 -0
  26. package/es/locale/lang/vi-VN.js +6 -0
  27. package/es/locale/lang/zh-CHT.js +6 -0
  28. package/es/locale/lang/zh-CN.js +6 -0
  29. package/es/style.css +1 -1
  30. package/es/style.min.css +1 -1
  31. package/es/table/module/custom/mixin.js +29 -3
  32. package/es/table/module/custom/panel.js +118 -105
  33. package/es/table/src/body.js +9 -6
  34. package/es/table/src/methods.js +34 -26
  35. package/es/table/src/props.js +32 -8
  36. package/es/table/src/table.js +57 -38
  37. package/es/table/style.css +22 -3
  38. package/es/table/style.min.css +1 -1
  39. package/es/ui/index.js +4 -1
  40. package/es/ui/src/log.js +1 -1
  41. package/es/vxe-table/style.css +22 -3
  42. package/es/vxe-table/style.min.css +1 -1
  43. package/lib/grid/src/grid.js +81 -82
  44. package/lib/grid/src/grid.min.js +1 -1
  45. package/lib/{iconfont.1749796837661.ttf → iconfont.1750082820248.ttf} +0 -0
  46. package/lib/iconfont.1750082820248.woff +0 -0
  47. package/lib/iconfont.1750082820248.woff2 +0 -0
  48. package/lib/index.css +1 -1
  49. package/lib/index.min.css +1 -1
  50. package/lib/index.umd.js +285 -187
  51. package/lib/index.umd.min.js +1 -1
  52. package/lib/locale/lang/ar-EG.js +6 -0
  53. package/lib/locale/lang/ar-EG.min.js +1 -1
  54. package/lib/locale/lang/ar-EG.umd.js +6 -0
  55. package/lib/locale/lang/de-DE.js +6 -0
  56. package/lib/locale/lang/de-DE.min.js +1 -1
  57. package/lib/locale/lang/de-DE.umd.js +6 -0
  58. package/lib/locale/lang/en-US.js +6 -0
  59. package/lib/locale/lang/en-US.min.js +1 -1
  60. package/lib/locale/lang/en-US.umd.js +6 -0
  61. package/lib/locale/lang/es-ES.js +6 -0
  62. package/lib/locale/lang/es-ES.min.js +1 -1
  63. package/lib/locale/lang/es-ES.umd.js +6 -0
  64. package/lib/locale/lang/fr-FR.js +6 -0
  65. package/lib/locale/lang/fr-FR.min.js +1 -1
  66. package/lib/locale/lang/fr-FR.umd.js +6 -0
  67. package/lib/locale/lang/hu-HU.js +6 -0
  68. package/lib/locale/lang/hu-HU.min.js +1 -1
  69. package/lib/locale/lang/hu-HU.umd.js +6 -0
  70. package/lib/locale/lang/hy-AM.js +6 -0
  71. package/lib/locale/lang/hy-AM.min.js +1 -1
  72. package/lib/locale/lang/hy-AM.umd.js +6 -0
  73. package/lib/locale/lang/id-ID.js +6 -0
  74. package/lib/locale/lang/id-ID.min.js +1 -1
  75. package/lib/locale/lang/id-ID.umd.js +6 -0
  76. package/lib/locale/lang/it-IT.js +6 -0
  77. package/lib/locale/lang/it-IT.min.js +1 -1
  78. package/lib/locale/lang/it-IT.umd.js +6 -0
  79. package/lib/locale/lang/ja-JP.js +6 -0
  80. package/lib/locale/lang/ja-JP.min.js +1 -1
  81. package/lib/locale/lang/ja-JP.umd.js +6 -0
  82. package/lib/locale/lang/ko-KR.js +6 -0
  83. package/lib/locale/lang/ko-KR.min.js +1 -1
  84. package/lib/locale/lang/ko-KR.umd.js +6 -0
  85. package/lib/locale/lang/ms-MY.js +6 -0
  86. package/lib/locale/lang/ms-MY.min.js +1 -1
  87. package/lib/locale/lang/ms-MY.umd.js +6 -0
  88. package/lib/locale/lang/nb-NO.js +6 -0
  89. package/lib/locale/lang/nb-NO.min.js +1 -1
  90. package/lib/locale/lang/nb-NO.umd.js +6 -0
  91. package/lib/locale/lang/pt-BR.js +6 -0
  92. package/lib/locale/lang/pt-BR.min.js +1 -1
  93. package/lib/locale/lang/pt-BR.umd.js +6 -0
  94. package/lib/locale/lang/ru-RU.js +6 -0
  95. package/lib/locale/lang/ru-RU.min.js +1 -1
  96. package/lib/locale/lang/ru-RU.umd.js +6 -0
  97. package/lib/locale/lang/th-TH.js +6 -0
  98. package/lib/locale/lang/th-TH.min.js +1 -1
  99. package/lib/locale/lang/th-TH.umd.js +6 -0
  100. package/lib/locale/lang/ug-CN.js +6 -0
  101. package/lib/locale/lang/ug-CN.min.js +1 -1
  102. package/lib/locale/lang/ug-CN.umd.js +6 -0
  103. package/lib/locale/lang/uk-UA.js +6 -0
  104. package/lib/locale/lang/uk-UA.min.js +1 -1
  105. package/lib/locale/lang/uk-UA.umd.js +6 -0
  106. package/lib/locale/lang/uz-UZ.js +6 -0
  107. package/lib/locale/lang/uz-UZ.min.js +1 -1
  108. package/lib/locale/lang/uz-UZ.umd.js +6 -0
  109. package/lib/locale/lang/vi-VN.js +6 -0
  110. package/lib/locale/lang/vi-VN.min.js +1 -1
  111. package/lib/locale/lang/vi-VN.umd.js +6 -0
  112. package/lib/locale/lang/zh-CHT.js +6 -0
  113. package/lib/locale/lang/zh-CHT.min.js +1 -1
  114. package/lib/locale/lang/zh-CHT.umd.js +6 -0
  115. package/lib/locale/lang/zh-CN.js +6 -0
  116. package/lib/locale/lang/zh-CN.min.js +1 -1
  117. package/lib/locale/lang/zh-CN.umd.js +6 -0
  118. package/lib/style.css +1 -1
  119. package/lib/style.min.css +1 -1
  120. package/lib/table/module/custom/mixin.js +32 -5
  121. package/lib/table/module/custom/mixin.min.js +1 -1
  122. package/lib/table/module/custom/panel.js +14 -2
  123. package/lib/table/module/custom/panel.min.js +1 -1
  124. package/lib/table/src/body.js +12 -12
  125. package/lib/table/src/body.min.js +1 -1
  126. package/lib/table/src/methods.js +38 -25
  127. package/lib/table/src/methods.min.js +1 -1
  128. package/lib/table/src/props.js +32 -8
  129. package/lib/table/src/table.js +64 -50
  130. package/lib/table/src/table.min.js +1 -1
  131. package/lib/table/style/style.css +22 -3
  132. package/lib/table/style/style.min.css +1 -1
  133. package/lib/ui/index.js +4 -1
  134. package/lib/ui/index.min.js +1 -1
  135. package/lib/ui/src/log.js +1 -1
  136. package/lib/ui/src/log.min.js +1 -1
  137. package/lib/vxe-table/style/style.css +22 -3
  138. package/lib/vxe-table/style/style.min.css +1 -1
  139. package/package.json +1 -1
  140. package/packages/grid/src/grid.ts +93 -54
  141. package/packages/locale/lang/ar-EG.ts +6 -0
  142. package/packages/locale/lang/de-DE.ts +6 -0
  143. package/packages/locale/lang/en-US.ts +6 -0
  144. package/packages/locale/lang/es-ES.ts +6 -0
  145. package/packages/locale/lang/fr-FR.ts +6 -0
  146. package/packages/locale/lang/hu-HU.ts +6 -0
  147. package/packages/locale/lang/hy-AM.ts +6 -0
  148. package/packages/locale/lang/id-ID.ts +6 -0
  149. package/packages/locale/lang/it-IT.ts +6 -0
  150. package/packages/locale/lang/ja-JP.ts +6 -0
  151. package/packages/locale/lang/ko-KR.ts +6 -0
  152. package/packages/locale/lang/ms-MY.ts +6 -0
  153. package/packages/locale/lang/nb-NO.ts +6 -0
  154. package/packages/locale/lang/pt-BR.ts +6 -0
  155. package/packages/locale/lang/ru-RU.ts +6 -0
  156. package/packages/locale/lang/th-TH.ts +6 -0
  157. package/packages/locale/lang/ug-CN.ts +6 -0
  158. package/packages/locale/lang/uk-UA.ts +6 -0
  159. package/packages/locale/lang/uz-UZ.ts +6 -0
  160. package/packages/locale/lang/vi-VN.ts +6 -0
  161. package/packages/locale/lang/zh-CHT.ts +6 -0
  162. package/packages/locale/lang/zh-CN.ts +6 -0
  163. package/packages/table/module/custom/mixin.ts +27 -3
  164. package/packages/table/module/custom/panel.ts +119 -106
  165. package/packages/table/src/body.ts +14 -11
  166. package/packages/table/src/cell.ts +12 -12
  167. package/packages/table/src/methods.ts +35 -26
  168. package/packages/table/src/props.ts +32 -8
  169. package/packages/table/src/table.ts +76 -49
  170. package/packages/ui/index.ts +11 -0
  171. package/styles/components/icon.scss +13 -1
  172. package/styles/components/table-module/custom.scss +9 -2
  173. package/styles/icon/iconfont.ttf +0 -0
  174. package/styles/icon/iconfont.woff +0 -0
  175. package/styles/icon/iconfont.woff2 +0 -0
  176. package/es/iconfont.1749796837661.woff +0 -0
  177. package/es/iconfont.1749796837661.woff2 +0 -0
  178. package/lib/iconfont.1749796837661.woff +0 -0
  179. package/lib/iconfont.1749796837661.woff2 +0 -0
@@ -41,8 +41,11 @@ function renderDefaultForm(h, $xeGrid) {
41
41
  const VxeUIFormComponent = VxeUI.getComponent('VxeForm');
42
42
  const props = $xeGrid;
43
43
  const slots = $xeGrid.$scopedSlots;
44
+ const reactData = $xeGrid;
44
45
  const { proxyConfig, formConfig } = props;
45
- const { proxyOpts, formData, formOpts } = $xeGrid;
46
+ const { formData } = reactData;
47
+ const proxyOpts = $xeGrid.computeProxyOpts;
48
+ const formOpts = $xeGrid.computeFormOpts;
46
49
  if (isEnableConf(formConfig) && formOpts.items && formOpts.items.length) {
47
50
  const formSlots = {};
48
51
  if (!formOpts.inited) {
@@ -121,29 +124,44 @@ const getConfigSlot = ($xeGrid, slotConfigs) => {
121
124
  });
122
125
  return slotConf;
123
126
  };
124
- function getToolbarSlots(_vm) {
125
- const { $scopedSlots, toolbarOpts } = _vm;
127
+ function getToolbarSlots($xeGrid) {
128
+ const slots = $xeGrid.$scopedSlots;
129
+ const toolbarOpts = $xeGrid.computeToolbarOpts;
126
130
  const toolbarOptSlots = toolbarOpts.slots;
127
- let buttonsSlot;
128
- let toolsSlot;
129
- const slots = {};
130
- if ($scopedSlots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
131
+ const toolbarSlots = {};
132
+ if (slots.buttons && (!toolbarOptSlots || toolbarOptSlots.buttons !== 'buttons')) {
131
133
  warnLog('vxe.error.reqProp', ['toolbar-config.slots.buttons']);
132
134
  }
133
- if ($scopedSlots.tools && (!toolbarOptSlots || toolbarOptSlots.tools !== 'tools')) {
135
+ if (slots.tools && (!toolbarOptSlots || toolbarOptSlots.tools !== 'tools')) {
134
136
  warnLog('vxe.error.reqProp', ['toolbar-config.slots.tools']);
135
137
  }
136
138
  if (toolbarOptSlots) {
137
- buttonsSlot = getFuncSlot(_vm, toolbarOptSlots, 'buttons');
138
- toolsSlot = getFuncSlot(_vm, toolbarOptSlots, 'tools');
139
+ const buttonsSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'buttons');
140
+ const buttonPrefixSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'buttonPrefix');
141
+ const buttonSuffixSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'buttonSuffix');
142
+ const toolsSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'tools');
143
+ const toolPrefixSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'toolPrefix');
144
+ const toolSuffixSlot = getFuncSlot($xeGrid, toolbarOptSlots, 'toolSuffix');
139
145
  if (buttonsSlot) {
140
- slots.buttons = buttonsSlot;
146
+ toolbarSlots.buttons = buttonsSlot;
147
+ }
148
+ if (buttonPrefixSlot) {
149
+ toolbarSlots.buttonPrefix = buttonPrefixSlot;
150
+ }
151
+ if (buttonSuffixSlot) {
152
+ toolbarSlots.buttonSuffix = buttonSuffixSlot;
141
153
  }
142
154
  if (toolsSlot) {
143
- slots.tools = toolsSlot;
155
+ toolbarSlots.tools = toolsSlot;
156
+ }
157
+ if (toolPrefixSlot) {
158
+ toolbarSlots.toolPrefix = toolPrefixSlot;
159
+ }
160
+ if (toolSuffixSlot) {
161
+ toolbarSlots.toolSuffix = toolSuffixSlot;
144
162
  }
145
163
  }
146
- return slots;
164
+ return toolbarSlots;
147
165
  }
148
166
  function getTableOns(_vm) {
149
167
  const { $listeners, proxyConfig, proxyOpts } = _vm;
@@ -182,90 +200,96 @@ function pageChangeEvent($xeGrid, params) {
182
200
  /**
183
201
  * 渲染表单
184
202
  */
185
- function renderForm(h, _vm) {
186
- const { _e, $scopedSlots, formConfig } = _vm;
187
- const formSlot = $scopedSlots.form;
203
+ function renderForm(h, $xeGrid) {
204
+ const slots = $xeGrid.$scopedSlots;
205
+ const props = $xeGrid;
206
+ const { formConfig } = props;
207
+ const formSlot = slots.form;
188
208
  const hasForm = !!(formSlot || isEnableConf(formConfig));
189
209
  if (hasForm) {
190
210
  return h('div', {
191
211
  key: 'form',
192
212
  ref: 'refFormWrapper',
193
213
  class: 'vxe-grid--form-wrapper'
194
- }, formSlot ? formSlot.call(_vm, { $grid: _vm }, h) : renderDefaultForm(h, _vm));
214
+ }, formSlot ? formSlot.call($xeGrid, { $grid: $xeGrid }) : renderDefaultForm(h, $xeGrid));
195
215
  }
196
- return _e();
216
+ return renderEmptyElement($xeGrid);
197
217
  }
198
218
  /**
199
219
  * 渲染工具栏
200
220
  */
201
- function renderToolbar(h, _vm) {
202
- const { _e, $scopedSlots, toolbarConfig, toolbar } = _vm;
203
- const toolbarSlot = $scopedSlots.toolbar;
221
+ function renderToolbar(h, $xeGrid) {
222
+ const slots = $xeGrid.$scopedSlots;
223
+ const props = $xeGrid;
224
+ const { toolbarConfig } = props;
225
+ const toolbarSlot = slots.toolbar;
204
226
  const hasToolbar = !!(toolbarSlot || isEnableConf(toolbarConfig) || toolbar);
227
+ const toolbarOpts = $xeGrid.computeToolbarOpts;
205
228
  if (hasToolbar) {
206
229
  return h('div', {
207
230
  key: 'toolbar',
208
231
  ref: 'refToolbarWrapper',
209
232
  class: 'vxe-grid--toolbar-wrapper'
210
233
  }, toolbarSlot
211
- ? toolbarSlot.call(_vm, { $grid: _vm }, h)
234
+ ? toolbarSlot.call($xeGrid, { $grid: $xeGrid })
212
235
  : [
213
236
  h(VxeToolbarComponent, {
214
- props: Object.assign({}, _vm.toolbarOpts, { slots: undefined }),
237
+ props: Object.assign({}, toolbarOpts, { slots: undefined }),
215
238
  ref: 'xToolbar',
216
- scopedSlots: getToolbarSlots(_vm)
239
+ scopedSlots: getToolbarSlots($xeGrid)
217
240
  })
218
241
  ]);
219
242
  }
220
- return _e();
243
+ return renderEmptyElement($xeGrid);
221
244
  }
222
245
  /**
223
246
  * 渲染表格顶部区域
224
247
  */
225
- function renderTop(h, _vm) {
226
- const { _e, $scopedSlots } = _vm;
227
- const topSlot = $scopedSlots.top;
248
+ function renderTop(h, $xeGrid) {
249
+ const slots = $xeGrid.$scopedSlots;
250
+ const topSlot = slots.top;
228
251
  return topSlot
229
252
  ? h('div', {
230
253
  key: 'top',
231
254
  ref: 'refTopWrapper',
232
255
  class: 'vxe-grid--top-wrapper'
233
- }, topSlot.call(_vm, { $grid: _vm }, h))
234
- : _e();
256
+ }, topSlot.call($xeGrid, { $grid: $xeGrid }))
257
+ : renderEmptyElement($xeGrid);
235
258
  }
236
- function renderTableLeft(h, _vm) {
237
- const { _e, $scopedSlots } = _vm;
238
- const leftSlot = $scopedSlots.left;
259
+ function renderTableLeft(h, $xeGrid) {
260
+ const slots = $xeGrid.$scopedSlots;
261
+ const leftSlot = slots.left;
239
262
  if (leftSlot) {
240
263
  return h('div', {
241
264
  class: 'vxe-grid--left-wrapper'
242
- }, leftSlot({ $grid: _vm }));
265
+ }, leftSlot({ $grid: $xeGrid }));
243
266
  }
244
- return _e();
267
+ return renderEmptyElement($xeGrid);
245
268
  }
246
- function renderTableRight(h, _vm) {
247
- const { _e, $scopedSlots } = _vm;
248
- const rightSlot = $scopedSlots.right;
269
+ function renderTableRight(h, $xeGrid) {
270
+ const slots = $xeGrid.$scopedSlots;
271
+ const rightSlot = slots.right;
249
272
  if (rightSlot) {
250
273
  return h('div', {
251
274
  class: 'vxe-grid--right-wrapper'
252
- }, rightSlot({ $grid: _vm }));
275
+ }, rightSlot({ $grid: $xeGrid }));
253
276
  }
254
- return _e();
277
+ return renderEmptyElement($xeGrid);
255
278
  }
256
279
  /**
257
280
  * 渲染表格
258
281
  */
259
- function renderTable(h, _vm) {
260
- const { $scopedSlots, tableProps } = _vm;
282
+ function renderTable(h, $xeGrid) {
283
+ const slots = $xeGrid.$scopedSlots;
284
+ const tableProps = $xeGrid.computeTableProps;
261
285
  return h('div', {
262
286
  class: 'vxe-grid--table-wrapper'
263
287
  }, [
264
288
  h('vxe-table', {
265
289
  key: 'table',
266
290
  props: tableProps,
267
- on: getTableOns(_vm),
268
- scopedSlots: $scopedSlots,
291
+ on: getTableOns($xeGrid),
292
+ scopedSlots: slots,
269
293
  ref: 'xTable'
270
294
  })
271
295
  ]);
@@ -273,16 +297,16 @@ function renderTable(h, _vm) {
273
297
  /**
274
298
  * 渲染表格底部区域
275
299
  */
276
- function renderBottom(h, _vm) {
277
- const { _e, $scopedSlots } = _vm;
278
- const bottomSlot = $scopedSlots.bottom;
300
+ function renderBottom(h, $xeGrid) {
301
+ const slots = $xeGrid.$scopedSlots;
302
+ const bottomSlot = slots.bottom;
279
303
  return bottomSlot
280
304
  ? h('div', {
281
305
  key: 'bottom',
282
306
  ref: 'refBottomWrapper',
283
307
  class: 'vxe-grid--bottom-wrapper'
284
- }, bottomSlot.call(_vm, { $grid: _vm }, h))
285
- : _e();
308
+ }, bottomSlot.call($xeGrid, { $grid: $xeGrid }))
309
+ : renderEmptyElement($xeGrid);
286
310
  }
287
311
  /**
288
312
  * 渲染分页
Binary file
Binary file