vxe-table 4.23.8 → 4.23.10

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 +5683 -3798
  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 +5 -3
  7. package/es/index.js +5 -3
  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 +5 -3
  36. package/lib/index.js +5 -3
  37. package/lib/index.umd.js +5652 -3797
  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 +42 -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 +13 -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.1793015256719.ttf} +0 -0
  119. /package/dist/{iconfont.1793007753347.woff → iconfont.1793015256719.woff} +0 -0
  120. /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793015256719.woff2} +0 -0
  121. /package/es/{iconfont.1793007753347.ttf → iconfont.1793015256719.ttf} +0 -0
  122. /package/es/{iconfont.1793007753347.woff → iconfont.1793015256719.woff} +0 -0
  123. /package/es/{iconfont.1793007753347.woff2 → iconfont.1793015256719.woff2} +0 -0
  124. /package/lib/{iconfont.1793007753347.ttf → iconfont.1793015256719.ttf} +0 -0
  125. /package/lib/{iconfont.1793007753347.woff → iconfont.1793015256719.woff} +0 -0
  126. /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793015256719.woff2} +0 -0
@@ -23,7 +23,29 @@ var body_default = defineVxeComponent({
23
23
  setup(props) {
24
24
  const $xeTable = inject("$xeTable", {});
25
25
  const { xID, props: tableProps, context: tableContext, reactData: tableReactData, internalData: tableInternalData } = $xeTable;
26
- const { computeEditOpts, computeMouseOpts, computeCellOffsetWidth, computeAreaOpts, computeDefaultRowHeight, computeEmptyOpts, computeTooltipOpts, computeRadioOpts, computeExpandOpts, computeTreeOpts, computeCheckboxOpts, computeCellOpts, computeValidOpts, computeRowOpts, computeColumnOpts, computeRowDragOpts, computeResizableOpts, computeVirtualXOpts, computeVirtualYOpts, computeIsBodyRenderOptimize, computeRendererOpts } = $xeTable.getComputeMaps();
26
+ const {
27
+ computeEditOpts,
28
+ computeMouseOpts,
29
+ computeCellOffsetWidth,
30
+ computeAreaOpts,
31
+ computeDefaultRowHeight,
32
+ computeEmptyOpts,
33
+ computeTooltipOpts,
34
+ computeRadioOpts,
35
+ computeExpandOpts,
36
+ computeTreeOpts,
37
+ computeCheckboxOpts,
38
+ computeCellOpts,
39
+ computeValidOpts,
40
+ computeRowOpts,
41
+ computeColumnOpts,
42
+ computeRowDragOpts,
43
+ computeResizableOpts,
44
+ computeVirtualXOpts,
45
+ computeVirtualYOpts,
46
+ computeIsBodyRenderOptimize,
47
+ computeRendererOpts
48
+ } = $xeTable.getComputeMaps();
27
49
  const refElem = ref();
28
50
  const refBodyScroll = ref();
29
51
  const refBodyTable = ref();
@@ -72,19 +94,23 @@ var body_default = defineVxeComponent({
72
94
  lineHeight = `calc(-1em + ${Math.floor(cellHeight / 2 + getCellRestHeight(parentRowRest, cellOpts, rowOpts, defaultRowHeight) / 2)}px)`;
73
95
  }
74
96
  return [
75
- h("div", {
76
- key: "tl",
77
- class: "vxe-tree--line-wrapper"
78
- }, [
79
- h("div", {
80
- class: "vxe-tree--line",
81
- style: {
82
- height: lineHeight,
83
- bottom: `-${Math.floor(cellHeight / 2)}px`,
84
- left: `calc(${rLevel * treeOpts.indent}px + 1em)`
85
- }
86
- })
87
- ])
97
+ h(
98
+ "div",
99
+ {
100
+ key: "tl",
101
+ class: "vxe-tree--line-wrapper"
102
+ },
103
+ [
104
+ h("div", {
105
+ class: "vxe-tree--line",
106
+ style: {
107
+ height: lineHeight,
108
+ bottom: `-${Math.floor(cellHeight / 2)}px`,
109
+ left: `calc(${rLevel * treeOpts.indent}px + 1em)`
110
+ }
111
+ })
112
+ ]
113
+ )
88
114
  ];
89
115
  }
90
116
  return [];
@@ -317,11 +343,14 @@ var body_default = defineVxeComponent({
317
343
  tdVNs.push(
318
344
  h("div", {
319
345
  key: "tc",
320
- class: ["vxe-cell", {
321
- "c--title": showTitle,
322
- "c--tooltip": showTooltip,
323
- "c--ellipsis": showEllipsis
324
- }],
346
+ class: [
347
+ "vxe-cell",
348
+ {
349
+ "c--title": showTitle,
350
+ "c--tooltip": showTooltip,
351
+ "c--ellipsis": showEllipsis
352
+ }
353
+ ],
325
354
  style: tcStyle
326
355
  })
327
356
  );
@@ -332,47 +361,70 @@ var body_default = defineVxeComponent({
332
361
  const clVNs = [];
333
362
  if (!isVNPreEmptyStatus) {
334
363
  clVNs.push(
335
- h("div", {
336
- colid,
337
- rowid,
338
- class: "vxe-cell--wrapper vxe-body-cell--wrapper"
339
- }, column.renderCell(cellParams))
364
+ h(
365
+ "div",
366
+ {
367
+ colid,
368
+ rowid,
369
+ class: "vxe-cell--wrapper vxe-body-cell--wrapper"
370
+ },
371
+ column.renderCell(cellParams)
372
+ )
340
373
  );
341
374
  }
342
375
  tdVNs.push(
343
- h("div", {
344
- key: "tc",
345
- class: ["vxe-cell", {
346
- "c--title": showTitle,
347
- "c--tooltip": showTooltip,
348
- "c--ellipsis": showEllipsis
349
- }],
350
- style: tcStyle,
351
- title: showTitle ? $xeTable.getCellLabel(row, column) : null
352
- }, clVNs)
376
+ h(
377
+ "div",
378
+ {
379
+ key: "tc",
380
+ class: [
381
+ "vxe-cell",
382
+ {
383
+ "c--title": showTitle,
384
+ "c--tooltip": showTooltip,
385
+ "c--ellipsis": showEllipsis
386
+ }
387
+ ],
388
+ style: tcStyle,
389
+ title: showTitle ? $xeTable.getCellLabel(row, column) : null
390
+ },
391
+ clVNs
392
+ )
353
393
  );
354
394
  if (showValidTip && errorValidItem) {
355
395
  const errRule = errorValidItem.rule;
356
396
  const validSlot = slots ? slots.valid : null;
357
397
  const validParams = { ...cellParams, ...errorValidItem, rule: errorValidItem };
358
398
  tdVNs.push(
359
- h("div", {
360
- key: "tcv",
361
- class: ["vxe-cell--valid-error-tip", getPropClass(validOpts.className, validParams)],
362
- style: errRule && errRule.maxWidth ? {
363
- width: errRule.maxWidth + "px"
364
- } : null
365
- }, [
366
- h("div", {
367
- class: `vxe-cell--valid-error-wrapper vxe-cell--valid-error-theme-${validOpts.theme || "normal"}`
368
- }, [
369
- validSlot ? $xeTable.callSlot(validSlot, validParams) : [
370
- h("span", {
371
- class: "vxe-cell--valid-error-msg"
372
- }, errorValidItem.content)
373
- ]
374
- ])
375
- ])
399
+ h(
400
+ "div",
401
+ {
402
+ key: "tcv",
403
+ class: ["vxe-cell--valid-error-tip", getPropClass(validOpts.className, validParams)],
404
+ style: errRule && errRule.maxWidth ? {
405
+ width: errRule.maxWidth + "px"
406
+ } : null
407
+ },
408
+ [
409
+ h(
410
+ "div",
411
+ {
412
+ class: `vxe-cell--valid-error-wrapper vxe-cell--valid-error-theme-${validOpts.theme || "normal"}`
413
+ },
414
+ [
415
+ validSlot ? $xeTable.callSlot(validSlot, validParams) : [
416
+ h(
417
+ "span",
418
+ {
419
+ class: "vxe-cell--valid-error-msg"
420
+ },
421
+ errorValidItem.content
422
+ )
423
+ ]
424
+ ]
425
+ )
426
+ ]
427
+ )
376
428
  );
377
429
  }
378
430
  }
@@ -384,9 +436,12 @@ var body_default = defineVxeComponent({
384
436
  tdVNs.push(
385
437
  h("div", {
386
438
  key: "tcc",
387
- class: ["vxe-cell--col-resizable", {
388
- "is--line": !border || border === "none"
389
- }],
439
+ class: [
440
+ "vxe-cell--col-resizable",
441
+ {
442
+ "is--line": !border || border === "none"
443
+ }
444
+ ],
390
445
  onMousedown: (evnt) => $xeTable.handleColResizeMousedownEvent(evnt, fixedType, cellParams),
391
446
  onDblclick: (evnt) => $xeTable.handleColResizeDblclickEvent(evnt, cellParams)
392
447
  })
@@ -402,47 +457,51 @@ var body_default = defineVxeComponent({
402
457
  })
403
458
  );
404
459
  }
405
- return h("td", {
406
- class: [
407
- "vxe-table--column vxe-body--column",
408
- colid,
409
- cellVerticalAlign ? `col--vertical-${cellVerticalAlign}` : "",
410
- cellAlign ? `col--${cellAlign}` : "",
411
- type ? `col--${type}` : "",
412
- {
413
- "col--last": isLastColumn,
414
- "col--tree-node": treeNode,
415
- "col--edit": isEdit,
416
- "col--ellipsis": hasEllipsis,
417
- "col--cs-height": isCsHeight,
418
- "col--rs-height": isRsHeight,
419
- "col--to-row": showAreaRowStatus,
420
- "col--auto-height": isVNAutoHeight,
421
- "col--max-height": maxHeight,
422
- "fixed--width": !isAutoCellWidth,
423
- "fixed--hidden": fixedHiddenColumn,
424
- "is--pg-top": isCellPaddingTop,
425
- "is--pg-bottom": isCellPaddingBottom,
426
- "is--pg-left": isCellPaddingLeft,
427
- "is--pg-right": isCellPaddingRight,
428
- "is--progress": fixedHiddenColumn && isAllOverflow || isVNPreEmptyStatus,
429
- "is--drag-cell": isRowDragCell && (isCrossDrag || isPeerDrag || !rowLevel),
430
- "is--drag-disabled": isDisabledDrag,
431
- "col--dirty": isDirty,
432
- "col--active": editConfig && isEdit && (actived.row === row && (actived.column === column || editOpts.mode === "row")),
433
- "col--valid-error": !!errorValidItem,
434
- "show--valid-bg": errorValidItem && validOpts.showErrorBackground,
435
- "col--current": currColFlag && currentCol === column
436
- },
437
- getPropClass(compCellClassName, cellParams),
438
- getPropClass(className, cellParams),
439
- getPropClass(allCellClassName, cellParams)
440
- ],
441
- key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex,
442
- ...tdAttrs,
443
- style: Object.assign({}, XEUtils.isFunction(compCellStyle) ? compCellStyle(cellParams) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(cellParams) : cellStyle),
444
- ...tdOns
445
- }, isOptimizeMode && fixedHiddenColumn ? [] : tdVNs);
460
+ return h(
461
+ "td",
462
+ {
463
+ class: [
464
+ "vxe-table--column vxe-body--column",
465
+ colid,
466
+ cellVerticalAlign ? `col--vertical-${cellVerticalAlign}` : "",
467
+ cellAlign ? `col--${cellAlign}` : "",
468
+ type ? `col--${type}` : "",
469
+ {
470
+ "col--last": isLastColumn,
471
+ "col--tree-node": treeNode,
472
+ "col--edit": isEdit,
473
+ "col--ellipsis": hasEllipsis,
474
+ "col--cs-height": isCsHeight,
475
+ "col--rs-height": isRsHeight,
476
+ "col--to-row": showAreaRowStatus,
477
+ "col--auto-height": isVNAutoHeight,
478
+ "col--max-height": maxHeight,
479
+ "fixed--width": !isAutoCellWidth,
480
+ "fixed--hidden": fixedHiddenColumn,
481
+ "is--pg-top": isCellPaddingTop,
482
+ "is--pg-bottom": isCellPaddingBottom,
483
+ "is--pg-left": isCellPaddingLeft,
484
+ "is--pg-right": isCellPaddingRight,
485
+ "is--progress": fixedHiddenColumn && isAllOverflow || isVNPreEmptyStatus,
486
+ "is--drag-cell": isRowDragCell && (isCrossDrag || isPeerDrag || !rowLevel),
487
+ "is--drag-disabled": isDisabledDrag,
488
+ "col--dirty": isDirty,
489
+ "col--active": editConfig && isEdit && actived.row === row && (actived.column === column || editOpts.mode === "row"),
490
+ "col--valid-error": !!errorValidItem,
491
+ "show--valid-bg": errorValidItem && validOpts.showErrorBackground,
492
+ "col--current": currColFlag && currentCol === column
493
+ },
494
+ getPropClass(compCellClassName, cellParams),
495
+ getPropClass(className, cellParams),
496
+ getPropClass(allCellClassName, cellParams)
497
+ ],
498
+ key: columnKey || scrollXLoad || scrollYLoad || columnOpts.useKey || rowOpts.useKey || columnOpts.drag ? colid : $columnIndex,
499
+ ...tdAttrs,
500
+ style: Object.assign({}, XEUtils.isFunction(compCellStyle) ? compCellStyle(cellParams) : compCellStyle, XEUtils.isFunction(cellStyle) ? cellStyle(cellParams) : cellStyle),
501
+ ...tdOns
502
+ },
503
+ isOptimizeMode && fixedHiddenColumn ? [] : tdVNs
504
+ );
446
505
  };
447
506
  const renderRows = (fixedType, isOptimizeMode, tableData, tableColumn) => {
448
507
  const $xeGrid = $xeTable.xeGrid;
@@ -544,13 +603,17 @@ var body_default = defineVxeComponent({
544
603
  return renderTdColumn(seq, rowid, fixedType, isOptimizeMode, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
545
604
  });
546
605
  rows.push(
547
- h("tr", {
548
- class: trClass,
549
- rowid,
550
- style: rowStyle ? XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
551
- key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
552
- ...trOn
553
- }, tdVNs)
606
+ h(
607
+ "tr",
608
+ {
609
+ class: trClass,
610
+ rowid,
611
+ style: rowStyle ? XEUtils.isFunction(rowStyle) ? rowStyle(params) : rowStyle : null,
612
+ key: rowKey || rowOpts.useKey || rowOpts.drag || columnOpts.drag || isRowGroupStatus || treeConfig ? rowid : $rowIndex,
613
+ ...trOn
614
+ },
615
+ tdVNs
616
+ )
554
617
  );
555
618
  if (isExpandRow) {
556
619
  const expandOpts = computeExpandOpts.value;
@@ -564,19 +627,23 @@ var body_default = defineVxeComponent({
564
627
  }
565
628
  }
566
629
  rows.push(
567
- h("tr", {
568
- class: "vxe-body--row-expanded-place",
569
- key: `expand_${rowid}`,
570
- rowid
571
- }, [
572
- h("td", {
573
- class: "vxe-body--row-expanded-place-column",
574
- colspan: tableColumn.length,
575
- style: {
576
- height: `${expHeight}px`
577
- }
578
- })
579
- ])
630
+ h(
631
+ "tr",
632
+ {
633
+ class: "vxe-body--row-expanded-place",
634
+ key: `expand_${rowid}`,
635
+ rowid
636
+ },
637
+ [
638
+ h("td", {
639
+ class: "vxe-body--row-expanded-place-column",
640
+ colspan: tableColumn.length,
641
+ style: {
642
+ height: `${expHeight}px`
643
+ }
644
+ })
645
+ ]
646
+ )
580
647
  );
581
648
  } else {
582
649
  const cellStyle = {};
@@ -623,29 +690,48 @@ var body_default = defineVxeComponent({
623
690
  items: []
624
691
  };
625
692
  rows.push(
626
- h("tr", {
627
- class: ["vxe-body--expanded-row", {
628
- "is--padding": padding
629
- }],
630
- key: `expand_${rowid}`
631
- }, [
632
- h("td", {
633
- class: ["vxe-body--expanded-column", {
634
- "fixed--hidden": fixedType && !hasFixedColumn,
635
- "col--ellipsis": hasEllipsis
636
- }],
637
- colspan: tableColumn.length
638
- }, [
639
- h("div", {
640
- class: ["vxe-body--expanded-cell", {
641
- "is--ellipsis": expandHeight
642
- }],
643
- style: cellStyle
644
- }, [
645
- expandColumn.renderData(expandParams)
646
- ])
647
- ])
648
- ])
693
+ h(
694
+ "tr",
695
+ {
696
+ class: [
697
+ "vxe-body--expanded-row",
698
+ {
699
+ "is--padding": padding
700
+ }
701
+ ],
702
+ key: `expand_${rowid}`
703
+ },
704
+ [
705
+ h(
706
+ "td",
707
+ {
708
+ class: [
709
+ "vxe-body--expanded-column",
710
+ {
711
+ "fixed--hidden": fixedType && !hasFixedColumn,
712
+ "col--ellipsis": hasEllipsis
713
+ }
714
+ ],
715
+ colspan: tableColumn.length
716
+ },
717
+ [
718
+ h(
719
+ "div",
720
+ {
721
+ class: [
722
+ "vxe-body--expanded-cell",
723
+ {
724
+ "is--ellipsis": expandHeight
725
+ }
726
+ ],
727
+ style: cellStyle
728
+ },
729
+ [expandColumn.renderData(expandParams)]
730
+ )
731
+ ]
732
+ )
733
+ ]
734
+ )
649
735
  );
650
736
  }
651
737
  }
@@ -764,101 +850,137 @@ var body_default = defineVxeComponent({
764
850
  emptyContent = tableProps.emptyText || getI18n("vxe.table.emptyText");
765
851
  }
766
852
  }
767
- return h("div", {
768
- ref: refElem,
769
- class: ["vxe-table--body-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
770
- xid: xID
771
- }, [
772
- h("div", {
773
- ref: refBodyScroll,
774
- class: "vxe-table--body-inner-wrapper",
775
- onScroll(evnt) {
776
- $xeTable.triggerBodyScrollEvent(evnt, fixedType);
777
- }
778
- }, [
779
- fixedType ? renderEmptyElement($xeTable) : h("div", {
780
- ref: refBodyXSpace,
781
- class: "vxe-body--x-space"
782
- }),
783
- h("div", {
784
- ref: refBodyYSpace,
785
- class: "vxe-body--y-space"
786
- }),
787
- h("table", {
788
- ref: refBodyTable,
789
- class: "vxe-table--body",
790
- xid: xID,
791
- cellspacing: 0,
792
- cellpadding: 0,
793
- border: 0,
794
- xvm: isOptimizeMode ? "1" : null
795
- }, [
796
- /**
797
- * 列宽
798
- */
799
- h("colgroup", {
800
- ref: refBodyColgroup
801
- }, renderColumnList.map((column, $columnIndex) => {
802
- return h("col", {
803
- name: column.id,
804
- key: $columnIndex,
805
- style: {
806
- width: `${column.renderWidth}px`
807
- }
808
- });
809
- })),
810
- /**
811
- * 内容
812
- */
813
- h("tbody", {
814
- ref: refBodyTBody
815
- }, renderRows(fixedType, isOptimizeMode, renderDataList, renderColumnList))
816
- ]),
817
- h("div", {
818
- class: "vxe-table--checkbox-range"
819
- }),
820
- hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? h("div", {
821
- class: "vxe-table--cell-area",
822
- xid: xID
823
- }, [
824
- h("span", {
825
- class: "vxe-table--cell-main-area"
826
- }, mouseOpts.extension ? [
827
- h("span", {
828
- class: "vxe-table--cell-main-area-btn",
829
- onMousedown(evnt) {
830
- if ($xeTable.triggerCellAreaExtendMousedownEvent) {
831
- $xeTable.triggerCellAreaExtendMousedownEvent(evnt, { $table: $xeTable, fixed: fixedType, type: renderType });
832
- }
833
- }
834
- })
835
- ] : []),
836
- h("span", {
837
- class: "vxe-table--cell-clip-area"
838
- }),
839
- h("span", {
840
- class: "vxe-table--cell-extend-area"
841
- }),
842
- h("span", {
843
- class: "vxe-table--cell-multi-area"
844
- }),
845
- h("span", {
846
- class: "vxe-table--cell-active-area"
847
- }),
848
- h("span", {
849
- class: "vxe-table--cell-row-status-area"
850
- })
851
- ]) : renderEmptyElement($xeTable),
852
- !fixedType ? h("div", {
853
- class: "vxe-table--empty-block",
854
- ref: refBodyEmptyBlock
855
- }, [
856
- h("div", {
857
- class: "vxe-table--empty-content"
858
- }, emptyContent)
859
- ]) : renderEmptyElement($xeTable)
860
- ])
861
- ]);
853
+ return h(
854
+ "div",
855
+ {
856
+ ref: refElem,
857
+ class: ["vxe-table--body-wrapper", fixedType ? `fixed-${fixedType}--wrapper` : "body--wrapper"],
858
+ xid: xID
859
+ },
860
+ [
861
+ h(
862
+ "div",
863
+ {
864
+ ref: refBodyScroll,
865
+ class: "vxe-table--body-inner-wrapper",
866
+ onScroll(evnt) {
867
+ $xeTable.triggerBodyScrollEvent(evnt, fixedType);
868
+ }
869
+ },
870
+ [
871
+ fixedType ? renderEmptyElement($xeTable) : h("div", {
872
+ ref: refBodyXSpace,
873
+ class: "vxe-body--x-space"
874
+ }),
875
+ h("div", {
876
+ ref: refBodyYSpace,
877
+ class: "vxe-body--y-space"
878
+ }),
879
+ h(
880
+ "table",
881
+ {
882
+ ref: refBodyTable,
883
+ class: "vxe-table--body",
884
+ xid: xID,
885
+ cellspacing: 0,
886
+ cellpadding: 0,
887
+ border: 0,
888
+ xvm: isOptimizeMode ? "1" : null
889
+ },
890
+ [
891
+ /**
892
+ * 列宽
893
+ */
894
+ h(
895
+ "colgroup",
896
+ {
897
+ ref: refBodyColgroup
898
+ },
899
+ renderColumnList.map((column, $columnIndex) => {
900
+ return h("col", {
901
+ name: column.id,
902
+ key: $columnIndex,
903
+ style: {
904
+ width: `${column.renderWidth}px`
905
+ }
906
+ });
907
+ })
908
+ ),
909
+ /**
910
+ * 内容
911
+ */
912
+ h(
913
+ "tbody",
914
+ {
915
+ ref: refBodyTBody
916
+ },
917
+ renderRows(fixedType, isOptimizeMode, renderDataList, renderColumnList)
918
+ )
919
+ ]
920
+ ),
921
+ h("div", {
922
+ class: "vxe-table--checkbox-range"
923
+ }),
924
+ hasEnableConf(mouseConfig, mouseOpts) && mouseOpts.area ? h(
925
+ "div",
926
+ {
927
+ class: "vxe-table--cell-area",
928
+ xid: xID
929
+ },
930
+ [
931
+ h(
932
+ "span",
933
+ {
934
+ class: "vxe-table--cell-main-area"
935
+ },
936
+ mouseOpts.extension ? [
937
+ h("span", {
938
+ class: "vxe-table--cell-main-area-btn",
939
+ onMousedown(evnt) {
940
+ if ($xeTable.triggerCellAreaExtendMousedownEvent) {
941
+ $xeTable.triggerCellAreaExtendMousedownEvent(evnt, { $table: $xeTable, fixed: fixedType, type: renderType });
942
+ }
943
+ }
944
+ })
945
+ ] : []
946
+ ),
947
+ h("span", {
948
+ class: "vxe-table--cell-clip-area"
949
+ }),
950
+ h("span", {
951
+ class: "vxe-table--cell-extend-area"
952
+ }),
953
+ h("span", {
954
+ class: "vxe-table--cell-multi-area"
955
+ }),
956
+ h("span", {
957
+ class: "vxe-table--cell-active-area"
958
+ }),
959
+ h("span", {
960
+ class: "vxe-table--cell-row-status-area"
961
+ })
962
+ ]
963
+ ) : renderEmptyElement($xeTable),
964
+ !fixedType ? h(
965
+ "div",
966
+ {
967
+ class: "vxe-table--empty-block",
968
+ ref: refBodyEmptyBlock
969
+ },
970
+ [
971
+ h(
972
+ "div",
973
+ {
974
+ class: "vxe-table--empty-content"
975
+ },
976
+ emptyContent
977
+ )
978
+ ]
979
+ ) : renderEmptyElement($xeTable)
980
+ ]
981
+ )
982
+ ]
983
+ );
862
984
  };
863
985
  return renderVN;
864
986
  }