vxe-table 4.23.8 → 4.23.9

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 (126) hide show
  1. package/dist/all.esm.js +5715 -3783
  2. package/es/components.d.ts +1 -0
  3. package/es/components.js +2 -7
  4. package/es/grid/src/emits.js +1 -15
  5. package/es/grid/src/grid.js +397 -120
  6. package/es/index.esm.js +1 -0
  7. package/es/index.js +1 -0
  8. package/es/table/module/custom/hook.js +49 -42
  9. package/es/table/module/custom/panel.js +777 -527
  10. package/es/table/module/edit/hook.js +140 -62
  11. package/es/table/module/export/export-panel.js +399 -316
  12. package/es/table/module/export/hook.js +395 -337
  13. package/es/table/module/export/import-panel.js +152 -123
  14. package/es/table/module/filter/hook.js +16 -2
  15. package/es/table/module/filter/panel.js +146 -84
  16. package/es/table/module/keyboard/hook.js +8 -4
  17. package/es/table/module/menu/panel.js +197 -126
  18. package/es/table/render/index.js +151 -98
  19. package/es/table/src/body.js +355 -233
  20. package/es/table/src/cell.js +426 -269
  21. package/es/table/src/columnInfo.js +1 -0
  22. package/es/table/src/footer.js +144 -99
  23. package/es/table/src/group.js +7 -3
  24. package/es/table/src/header.js +229 -172
  25. package/es/table/src/table.js +1503 -1030
  26. package/es/table/src/util.js +15 -19
  27. package/es/toolbar/src/toolbar.js +132 -75
  28. package/es/ui/index.js +1 -1
  29. package/es/ui/src/dom.js +9 -6
  30. package/es/ui/src/log.js +1 -1
  31. package/es/ui/src/utils.d.ts +1 -1
  32. package/lib/components.js +2 -7
  33. package/lib/grid/src/emits.js +1 -15
  34. package/lib/grid/src/grid.js +397 -120
  35. package/lib/index.common.js +1 -0
  36. package/lib/index.js +1 -0
  37. package/lib/index.umd.js +5732 -3800
  38. package/lib/index.umd.min.js +3 -3
  39. package/lib/table/module/custom/hook.js +49 -42
  40. package/lib/table/module/custom/panel.js +777 -527
  41. package/lib/table/module/edit/hook.js +140 -62
  42. package/lib/table/module/export/export-panel.js +399 -316
  43. package/lib/table/module/export/hook.js +395 -337
  44. package/lib/table/module/export/import-panel.js +152 -123
  45. package/lib/table/module/filter/hook.js +16 -2
  46. package/lib/table/module/filter/panel.js +146 -84
  47. package/lib/table/module/keyboard/hook.js +8 -4
  48. package/lib/table/module/menu/panel.js +197 -126
  49. package/lib/table/render/index.js +151 -98
  50. package/lib/table/src/body.js +355 -233
  51. package/lib/table/src/cell.js +426 -269
  52. package/lib/table/src/columnInfo.js +1 -0
  53. package/lib/table/src/footer.js +144 -99
  54. package/lib/table/src/group.js +7 -3
  55. package/lib/table/src/header.js +229 -172
  56. package/lib/table/src/table.js +1471 -1029
  57. package/lib/table/src/util.js +15 -19
  58. package/lib/toolbar/src/toolbar.js +132 -75
  59. package/lib/ui/index.js +1 -1
  60. package/lib/ui/src/dom.js +9 -6
  61. package/lib/ui/src/log.js +1 -1
  62. package/package.json +2 -2
  63. package/packages/colgroup/index.ts +22 -22
  64. package/packages/column/index.ts +22 -22
  65. package/packages/components.ts +41 -44
  66. package/packages/grid/index.ts +18 -18
  67. package/packages/grid/src/emits.ts +5 -19
  68. package/packages/grid/src/grid.ts +2229 -1925
  69. package/packages/grid/src/props.ts +22 -23
  70. package/packages/index.ts +11 -11
  71. package/packages/locale/lang/fr-FR.ts +15 -15
  72. package/packages/locale/lang/it-IT.ts +4 -4
  73. package/packages/locale/lang/uk-UA.ts +1 -1
  74. package/packages/locale/lang/uz-UZ.ts +13 -13
  75. package/packages/locale/lang/zh-CN.ts +907 -907
  76. package/packages/table/index.ts +26 -26
  77. package/packages/table/module/custom/hook.ts +510 -503
  78. package/packages/table/module/custom/panel.ts +2002 -1743
  79. package/packages/table/module/edit/hook.ts +1224 -1131
  80. package/packages/table/module/export/export-panel.ts +697 -611
  81. package/packages/table/module/export/hook.ts +2160 -2059
  82. package/packages/table/module/export/import-panel.ts +319 -279
  83. package/packages/table/module/export/util.ts +25 -24
  84. package/packages/table/module/filter/hook.ts +519 -501
  85. package/packages/table/module/filter/panel.ts +368 -304
  86. package/packages/table/module/keyboard/hook.ts +498 -494
  87. package/packages/table/module/menu/hook.ts +330 -330
  88. package/packages/table/module/menu/panel.ts +272 -201
  89. package/packages/table/module/validator/hook.ts +653 -635
  90. package/packages/table/render/index.ts +1819 -1744
  91. package/packages/table/src/body.ts +1078 -955
  92. package/packages/table/src/cell.ts +1524 -1359
  93. package/packages/table/src/column.ts +192 -192
  94. package/packages/table/src/columnInfo.ts +232 -232
  95. package/packages/table/src/emits.ts +134 -134
  96. package/packages/table/src/footer.ts +425 -380
  97. package/packages/table/src/group.ts +67 -63
  98. package/packages/table/src/header.ts +642 -581
  99. package/packages/table/src/props.ts +336 -336
  100. package/packages/table/src/store.ts +14 -14
  101. package/packages/table/src/table.ts +16011 -15454
  102. package/packages/table/src/use/cell-view.ts +41 -44
  103. package/packages/table/src/use/index.ts +1 -1
  104. package/packages/table/src/util.ts +1206 -1216
  105. package/packages/toolbar/index.ts +18 -18
  106. package/packages/toolbar/src/toolbar.ts +768 -706
  107. package/packages/ui/index.ts +519 -520
  108. package/packages/ui/src/anime.ts +51 -52
  109. package/packages/ui/src/comp.ts +3 -3
  110. package/packages/ui/src/dom.ts +466 -463
  111. package/packages/ui/src/log.ts +19 -19
  112. package/packages/ui/src/utils.ts +66 -66
  113. package/packages/ui/src/vn.ts +55 -55
  114. package/packages/v-x-e-table/index.d.ts +3 -3
  115. package/packages/v-x-e-table/index.ts +3 -3
  116. package/types/all.d.ts +76 -76
  117. package/types/index.d.ts +4 -4
  118. /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  119. /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  120. /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
  121. /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  122. /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  123. /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
  124. /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  125. /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  126. /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
@@ -179,6 +179,7 @@ class ColumnInfo {
179
179
  slots: colConfs.slots
180
180
  });
181
181
  if (ctFilterOptions && (!filters || !filters.length)) {
182
+ ;
182
183
  this.filters = toFilters(ctFilterOptions({ $table: $xeTable, column: this }), colId);
183
184
  }
184
185
  if ($xeGGWrapper) {
@@ -165,49 +165,73 @@ var footer_default = defineVxeComponent({
165
165
  } else {
166
166
  tcStyle.minHeight = `${currCellHeight}px`;
167
167
  }
168
- return h("td", {
169
- class: ["vxe-table--column vxe-footer--column", column.id, {
170
- [`col--${footAlign}`]: footAlign,
171
- [`col--${type}`]: type,
172
- "col--last": isLastColumn,
173
- "fixed--width": !isAutoCellWidth,
174
- "fixed--hidden": fixedHiddenColumn,
175
- "is--pg-top": isCellPaddingTop,
176
- "is--pg-bottom": isCellPaddingBottom,
177
- "is--pg-left": isCellPaddingLeft,
178
- "is--pg-right": isCellPaddingRight,
179
- "col--ellipsis": hasEllipsis,
180
- "col--current": currColFlag && currentCol === column
181
- }, getPropClass(footerClassName, cellParams), getPropClass(footerCellClassName, cellParams)],
182
- ...attrs,
183
- style: footerCellStyle ? XEUtils.isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle : null,
184
- ...tfOns,
185
- key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex
186
- }, [
187
- h("div", {
188
- class: ["vxe-cell", {
189
- "c--title": showTitle,
190
- "c--tooltip": showTooltip,
191
- "c--ellipsis": showEllipsis
192
- }],
193
- style: tcStyle
194
- }, isVNPreEmptyStatus ? [] : [
195
- h("div", {
196
- colid,
197
- class: "vxe-cell--wrapper vxe-footer-cell--wrapper"
198
- }, column.renderFooter(cellParams))
199
- ]),
200
- /**
201
- * 列宽拖动
202
- */
203
- !fixedHiddenColumn && showResizable && isAllColumnDrag ? h("div", {
204
- class: ["vxe-cell--col-resizable", {
205
- "is--line": !border || border === "none"
206
- }],
207
- onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
208
- onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
209
- }) : renderEmptyElement($xeTable)
210
- ]);
168
+ return h(
169
+ "td",
170
+ {
171
+ class: [
172
+ "vxe-table--column vxe-footer--column",
173
+ column.id,
174
+ {
175
+ [`col--${footAlign}`]: footAlign,
176
+ [`col--${type}`]: type,
177
+ "col--last": isLastColumn,
178
+ "fixed--width": !isAutoCellWidth,
179
+ "fixed--hidden": fixedHiddenColumn,
180
+ "is--pg-top": isCellPaddingTop,
181
+ "is--pg-bottom": isCellPaddingBottom,
182
+ "is--pg-left": isCellPaddingLeft,
183
+ "is--pg-right": isCellPaddingRight,
184
+ "col--ellipsis": hasEllipsis,
185
+ "col--current": currColFlag && currentCol === column
186
+ },
187
+ getPropClass(footerClassName, cellParams),
188
+ getPropClass(footerCellClassName, cellParams)
189
+ ],
190
+ ...attrs,
191
+ style: footerCellStyle ? XEUtils.isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle : null,
192
+ ...tfOns,
193
+ key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex
194
+ },
195
+ [
196
+ h(
197
+ "div",
198
+ {
199
+ class: [
200
+ "vxe-cell",
201
+ {
202
+ "c--title": showTitle,
203
+ "c--tooltip": showTooltip,
204
+ "c--ellipsis": showEllipsis
205
+ }
206
+ ],
207
+ style: tcStyle
208
+ },
209
+ isVNPreEmptyStatus ? [] : [
210
+ h(
211
+ "div",
212
+ {
213
+ colid,
214
+ class: "vxe-cell--wrapper vxe-footer-cell--wrapper"
215
+ },
216
+ column.renderFooter(cellParams)
217
+ )
218
+ ]
219
+ ),
220
+ /**
221
+ * 列宽拖动
222
+ */
223
+ !fixedHiddenColumn && showResizable && isAllColumnDrag ? h("div", {
224
+ class: [
225
+ "vxe-cell--col-resizable",
226
+ {
227
+ "is--line": !border || border === "none"
228
+ }
229
+ ],
230
+ onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
231
+ onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
232
+ }) : renderEmptyElement($xeTable)
233
+ ]
234
+ );
211
235
  });
212
236
  };
213
237
  const renderHeads = (isOptimizeMode, renderColumnList) => {
@@ -216,14 +240,15 @@ var footer_default = defineVxeComponent({
216
240
  return footerTableData.map((row, _rowIndex) => {
217
241
  const $rowIndex = _rowIndex;
218
242
  const rowParams = { $table: $xeTable, row, rowIndex: _rowIndex, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
219
- return h("tr", {
220
- key: _rowIndex,
221
- class: [
222
- "vxe-footer--row",
223
- footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ""
224
- ],
225
- style: footerRowStyle ? XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
226
- }, renderRows(isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex));
243
+ return h(
244
+ "tr",
245
+ {
246
+ key: _rowIndex,
247
+ class: ["vxe-footer--row", footerRowClassName ? XEUtils.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ""],
248
+ style: footerRowStyle ? XEUtils.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
249
+ },
250
+ renderRows(isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex)
251
+ );
227
252
  });
228
253
  };
229
254
  const renderVN = () => {
@@ -264,54 +289,74 @@ var footer_default = defineVxeComponent({
264
289
  }
265
290
  }
266
291
  }
267
- return h("div", {
268
- ref: refElem,
269
- class: ["vxe-table--footer-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
270
- xid: xID
271
- }, [
272
- h("div", {
273
- ref: refFooterScroll,
274
- class: "vxe-table--footer-inner-wrapper",
275
- onScroll(evnt) {
276
- $xeTable.triggerFooterScrollEvent(evnt, fixedType);
277
- }
278
- }, [
279
- fixedType ? renderEmptyElement($xeTable) : h("div", {
280
- ref: refFooterXSpace,
281
- class: "vxe-body--x-space"
282
- }),
283
- h("table", {
284
- ref: refFooterTable,
285
- class: "vxe-table--footer",
286
- xid: xID,
287
- cellspacing: 0,
288
- cellpadding: 0,
289
- border: 0,
290
- xvm: isOptimizeMode ? "1" : null
291
- }, [
292
- /**
293
- * 列宽
294
- */
295
- h("colgroup", {
296
- ref: refFooterColgroup
297
- }, renderColumnList.map((column, $columnIndex) => {
298
- return h("col", {
299
- name: column.id,
300
- key: $columnIndex,
301
- style: {
302
- width: `${column.renderWidth}px`
303
- }
304
- });
305
- })),
306
- /**
307
- * 底部
308
- */
309
- h("tfoot", {
310
- ref: refFooterTFoot
311
- }, renderHeads(isOptimizeMode, renderColumnList))
312
- ])
313
- ])
314
- ]);
292
+ return h(
293
+ "div",
294
+ {
295
+ ref: refElem,
296
+ class: ["vxe-table--footer-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
297
+ xid: xID
298
+ },
299
+ [
300
+ h(
301
+ "div",
302
+ {
303
+ ref: refFooterScroll,
304
+ class: "vxe-table--footer-inner-wrapper",
305
+ onScroll(evnt) {
306
+ $xeTable.triggerFooterScrollEvent(evnt, fixedType);
307
+ }
308
+ },
309
+ [
310
+ fixedType ? renderEmptyElement($xeTable) : h("div", {
311
+ ref: refFooterXSpace,
312
+ class: "vxe-body--x-space"
313
+ }),
314
+ h(
315
+ "table",
316
+ {
317
+ ref: refFooterTable,
318
+ class: "vxe-table--footer",
319
+ xid: xID,
320
+ cellspacing: 0,
321
+ cellpadding: 0,
322
+ border: 0,
323
+ xvm: isOptimizeMode ? "1" : null
324
+ },
325
+ [
326
+ /**
327
+ * 列宽
328
+ */
329
+ h(
330
+ "colgroup",
331
+ {
332
+ ref: refFooterColgroup
333
+ },
334
+ renderColumnList.map((column, $columnIndex) => {
335
+ return h("col", {
336
+ name: column.id,
337
+ key: $columnIndex,
338
+ style: {
339
+ width: `${column.renderWidth}px`
340
+ }
341
+ });
342
+ })
343
+ ),
344
+ /**
345
+ * 底部
346
+ */
347
+ h(
348
+ "tfoot",
349
+ {
350
+ ref: refFooterTFoot
351
+ },
352
+ renderHeads(isOptimizeMode, renderColumnList)
353
+ )
354
+ ]
355
+ )
356
+ ]
357
+ )
358
+ ]
359
+ );
315
360
  };
316
361
  onMounted(() => {
317
362
  nextTick(() => {
@@ -35,9 +35,13 @@ var group_default = defineVxeComponent({
35
35
  });
36
36
  const renderVN = () => {
37
37
  const defaultSlot = slots.default;
38
- return h("div", {
39
- ref: refElem
40
- }, defaultSlot ? defaultSlot() : []);
38
+ return h(
39
+ "div",
40
+ {
41
+ ref: refElem
42
+ },
43
+ defaultSlot ? defaultSlot() : []
44
+ );
41
45
  };
42
46
  const $xeColgroup = { columnConfig };
43
47
  provide("$xeColgroup", $xeColgroup);