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
@@ -212,6 +212,7 @@ class ColumnInfo {
212
212
  slots: colConfs.slots
213
213
  });
214
214
  if (ctFilterOptions && (!filters || !filters.length)) {
215
+ ;
215
216
  this.filters = (0, import_util.toFilters)(ctFilterOptions({ $table: $xeTable, column: this }), colId);
216
217
  }
217
218
  if ($xeGGWrapper) {
@@ -198,49 +198,73 @@ var footer_default = (0, import_comp.defineVxeComponent)({
198
198
  } else {
199
199
  tcStyle.minHeight = `${currCellHeight}px`;
200
200
  }
201
- return (0, import_vue.h)("td", {
202
- class: ["vxe-table--column vxe-footer--column", column.id, {
203
- [`col--${footAlign}`]: footAlign,
204
- [`col--${type}`]: type,
205
- "col--last": isLastColumn,
206
- "fixed--width": !isAutoCellWidth,
207
- "fixed--hidden": fixedHiddenColumn,
208
- "is--pg-top": isCellPaddingTop,
209
- "is--pg-bottom": isCellPaddingBottom,
210
- "is--pg-left": isCellPaddingLeft,
211
- "is--pg-right": isCellPaddingRight,
212
- "col--ellipsis": hasEllipsis,
213
- "col--current": currColFlag && currentCol === column
214
- }, (0, import_dom.getPropClass)(footerClassName, cellParams), (0, import_dom.getPropClass)(footerCellClassName, cellParams)],
215
- ...attrs,
216
- style: footerCellStyle ? import_xe_utils.default.isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle : null,
217
- ...tfOns,
218
- key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex
219
- }, [
220
- (0, import_vue.h)("div", {
221
- class: ["vxe-cell", {
222
- "c--title": showTitle,
223
- "c--tooltip": showTooltip,
224
- "c--ellipsis": showEllipsis
225
- }],
226
- style: tcStyle
227
- }, isVNPreEmptyStatus ? [] : [
228
- (0, import_vue.h)("div", {
229
- colid,
230
- class: "vxe-cell--wrapper vxe-footer-cell--wrapper"
231
- }, column.renderFooter(cellParams))
232
- ]),
233
- /**
234
- * 列宽拖动
235
- */
236
- !fixedHiddenColumn && showResizable && isAllColumnDrag ? (0, import_vue.h)("div", {
237
- class: ["vxe-cell--col-resizable", {
238
- "is--line": !border || border === "none"
239
- }],
240
- onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
241
- onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
242
- }) : renderEmptyElement($xeTable)
243
- ]);
201
+ return (0, import_vue.h)(
202
+ "td",
203
+ {
204
+ class: [
205
+ "vxe-table--column vxe-footer--column",
206
+ column.id,
207
+ {
208
+ [`col--${footAlign}`]: footAlign,
209
+ [`col--${type}`]: type,
210
+ "col--last": isLastColumn,
211
+ "fixed--width": !isAutoCellWidth,
212
+ "fixed--hidden": fixedHiddenColumn,
213
+ "is--pg-top": isCellPaddingTop,
214
+ "is--pg-bottom": isCellPaddingBottom,
215
+ "is--pg-left": isCellPaddingLeft,
216
+ "is--pg-right": isCellPaddingRight,
217
+ "col--ellipsis": hasEllipsis,
218
+ "col--current": currColFlag && currentCol === column
219
+ },
220
+ (0, import_dom.getPropClass)(footerClassName, cellParams),
221
+ (0, import_dom.getPropClass)(footerCellClassName, cellParams)
222
+ ],
223
+ ...attrs,
224
+ style: footerCellStyle ? import_xe_utils.default.isFunction(footerCellStyle) ? footerCellStyle(cellParams) : footerCellStyle : null,
225
+ ...tfOns,
226
+ key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || columnOpts.drag ? column.id : $columnIndex
227
+ },
228
+ [
229
+ (0, import_vue.h)(
230
+ "div",
231
+ {
232
+ class: [
233
+ "vxe-cell",
234
+ {
235
+ "c--title": showTitle,
236
+ "c--tooltip": showTooltip,
237
+ "c--ellipsis": showEllipsis
238
+ }
239
+ ],
240
+ style: tcStyle
241
+ },
242
+ isVNPreEmptyStatus ? [] : [
243
+ (0, import_vue.h)(
244
+ "div",
245
+ {
246
+ colid,
247
+ class: "vxe-cell--wrapper vxe-footer-cell--wrapper"
248
+ },
249
+ column.renderFooter(cellParams)
250
+ )
251
+ ]
252
+ ),
253
+ /**
254
+ * 列宽拖动
255
+ */
256
+ !fixedHiddenColumn && showResizable && isAllColumnDrag ? (0, import_vue.h)("div", {
257
+ class: [
258
+ "vxe-cell--col-resizable",
259
+ {
260
+ "is--line": !border || border === "none"
261
+ }
262
+ ],
263
+ onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
264
+ onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
265
+ }) : renderEmptyElement($xeTable)
266
+ ]
267
+ );
244
268
  });
245
269
  };
246
270
  const renderHeads = (isOptimizeMode, renderColumnList) => {
@@ -249,14 +273,15 @@ var footer_default = (0, import_comp.defineVxeComponent)({
249
273
  return footerTableData.map((row, _rowIndex) => {
250
274
  const $rowIndex = _rowIndex;
251
275
  const rowParams = { $table: $xeTable, row, rowIndex: _rowIndex, _rowIndex, $rowIndex, fixed: fixedType, type: renderType };
252
- return (0, import_vue.h)("tr", {
253
- key: _rowIndex,
254
- class: [
255
- "vxe-footer--row",
256
- footerRowClassName ? import_xe_utils.default.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ""
257
- ],
258
- style: footerRowStyle ? import_xe_utils.default.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
259
- }, renderRows(isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex));
276
+ return (0, import_vue.h)(
277
+ "tr",
278
+ {
279
+ key: _rowIndex,
280
+ class: ["vxe-footer--row", footerRowClassName ? import_xe_utils.default.isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ""],
281
+ style: footerRowStyle ? import_xe_utils.default.isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : null
282
+ },
283
+ renderRows(isOptimizeMode, renderColumnList, footerTableData, row, _rowIndex, _rowIndex)
284
+ );
260
285
  });
261
286
  };
262
287
  const renderVN = () => {
@@ -297,54 +322,74 @@ var footer_default = (0, import_comp.defineVxeComponent)({
297
322
  }
298
323
  }
299
324
  }
300
- return (0, import_vue.h)("div", {
301
- ref: refElem,
302
- class: ["vxe-table--footer-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
303
- xid: xID
304
- }, [
305
- (0, import_vue.h)("div", {
306
- ref: refFooterScroll,
307
- class: "vxe-table--footer-inner-wrapper",
308
- onScroll(evnt) {
309
- $xeTable.triggerFooterScrollEvent(evnt, fixedType);
310
- }
311
- }, [
312
- fixedType ? renderEmptyElement($xeTable) : (0, import_vue.h)("div", {
313
- ref: refFooterXSpace,
314
- class: "vxe-body--x-space"
315
- }),
316
- (0, import_vue.h)("table", {
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
- (0, import_vue.h)("colgroup", {
329
- ref: refFooterColgroup
330
- }, renderColumnList.map((column, $columnIndex) => {
331
- return (0, import_vue.h)("col", {
332
- name: column.id,
333
- key: $columnIndex,
334
- style: {
335
- width: `${column.renderWidth}px`
336
- }
337
- });
338
- })),
339
- /**
340
- * 底部
341
- */
342
- (0, import_vue.h)("tfoot", {
343
- ref: refFooterTFoot
344
- }, renderHeads(isOptimizeMode, renderColumnList))
345
- ])
346
- ])
347
- ]);
325
+ return (0, import_vue.h)(
326
+ "div",
327
+ {
328
+ ref: refElem,
329
+ class: ["vxe-table--footer-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
330
+ xid: xID
331
+ },
332
+ [
333
+ (0, import_vue.h)(
334
+ "div",
335
+ {
336
+ ref: refFooterScroll,
337
+ class: "vxe-table--footer-inner-wrapper",
338
+ onScroll(evnt) {
339
+ $xeTable.triggerFooterScrollEvent(evnt, fixedType);
340
+ }
341
+ },
342
+ [
343
+ fixedType ? renderEmptyElement($xeTable) : (0, import_vue.h)("div", {
344
+ ref: refFooterXSpace,
345
+ class: "vxe-body--x-space"
346
+ }),
347
+ (0, import_vue.h)(
348
+ "table",
349
+ {
350
+ ref: refFooterTable,
351
+ class: "vxe-table--footer",
352
+ xid: xID,
353
+ cellspacing: 0,
354
+ cellpadding: 0,
355
+ border: 0,
356
+ xvm: isOptimizeMode ? "1" : null
357
+ },
358
+ [
359
+ /**
360
+ * 列宽
361
+ */
362
+ (0, import_vue.h)(
363
+ "colgroup",
364
+ {
365
+ ref: refFooterColgroup
366
+ },
367
+ renderColumnList.map((column, $columnIndex) => {
368
+ return (0, import_vue.h)("col", {
369
+ name: column.id,
370
+ key: $columnIndex,
371
+ style: {
372
+ width: `${column.renderWidth}px`
373
+ }
374
+ });
375
+ })
376
+ ),
377
+ /**
378
+ * 底部
379
+ */
380
+ (0, import_vue.h)(
381
+ "tfoot",
382
+ {
383
+ ref: refFooterTFoot
384
+ },
385
+ renderHeads(isOptimizeMode, renderColumnList)
386
+ )
387
+ ]
388
+ )
389
+ ]
390
+ )
391
+ ]
392
+ );
348
393
  };
349
394
  (0, import_vue.onMounted)(() => {
350
395
  (0, import_vue.nextTick)(() => {
@@ -68,9 +68,13 @@ var group_default = (0, import_comp.defineVxeComponent)({
68
68
  });
69
69
  const renderVN = () => {
70
70
  const defaultSlot = slots.default;
71
- return (0, import_vue.h)("div", {
72
- ref: refElem
73
- }, defaultSlot ? defaultSlot() : []);
71
+ return (0, import_vue.h)(
72
+ "div",
73
+ {
74
+ ref: refElem
75
+ },
76
+ defaultSlot ? defaultSlot() : []
77
+ );
74
78
  };
75
79
  const $xeColgroup = { columnConfig };
76
80
  (0, import_vue.provide)("$xeColgroup", $xeColgroup);