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.
- package/dist/all.esm.js +5715 -3783
- package/es/components.d.ts +1 -0
- package/es/components.js +2 -7
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +397 -120
- package/es/index.esm.js +1 -0
- package/es/index.js +1 -0
- package/es/table/module/custom/hook.js +49 -42
- package/es/table/module/custom/panel.js +777 -527
- package/es/table/module/edit/hook.js +140 -62
- package/es/table/module/export/export-panel.js +399 -316
- package/es/table/module/export/hook.js +395 -337
- package/es/table/module/export/import-panel.js +152 -123
- package/es/table/module/filter/hook.js +16 -2
- package/es/table/module/filter/panel.js +146 -84
- package/es/table/module/keyboard/hook.js +8 -4
- package/es/table/module/menu/panel.js +197 -126
- package/es/table/render/index.js +151 -98
- package/es/table/src/body.js +355 -233
- package/es/table/src/cell.js +426 -269
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/footer.js +144 -99
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +229 -172
- package/es/table/src/table.js +1503 -1030
- package/es/table/src/util.js +15 -19
- package/es/toolbar/src/toolbar.js +132 -75
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +9 -6
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/lib/components.js +2 -7
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +397 -120
- package/lib/index.common.js +1 -0
- package/lib/index.js +1 -0
- package/lib/index.umd.js +5732 -3800
- package/lib/index.umd.min.js +3 -3
- package/lib/table/module/custom/hook.js +49 -42
- package/lib/table/module/custom/panel.js +777 -527
- package/lib/table/module/edit/hook.js +140 -62
- package/lib/table/module/export/export-panel.js +399 -316
- package/lib/table/module/export/hook.js +395 -337
- package/lib/table/module/export/import-panel.js +152 -123
- package/lib/table/module/filter/hook.js +16 -2
- package/lib/table/module/filter/panel.js +146 -84
- package/lib/table/module/keyboard/hook.js +8 -4
- package/lib/table/module/menu/panel.js +197 -126
- package/lib/table/render/index.js +151 -98
- package/lib/table/src/body.js +355 -233
- package/lib/table/src/cell.js +426 -269
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/footer.js +144 -99
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +229 -172
- package/lib/table/src/table.js +1471 -1029
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/src/toolbar.js +132 -75
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/package.json +2 -2
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -44
- package/packages/grid/index.ts +18 -18
- package/packages/grid/src/emits.ts +5 -19
- package/packages/grid/src/grid.ts +2229 -1925
- package/packages/grid/src/props.ts +22 -23
- package/packages/index.ts +11 -11
- package/packages/locale/lang/fr-FR.ts +15 -15
- package/packages/locale/lang/it-IT.ts +4 -4
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/uz-UZ.ts +13 -13
- package/packages/locale/lang/zh-CN.ts +907 -907
- package/packages/table/index.ts +26 -26
- package/packages/table/module/custom/hook.ts +510 -503
- package/packages/table/module/custom/panel.ts +2002 -1743
- package/packages/table/module/edit/hook.ts +1224 -1131
- package/packages/table/module/export/export-panel.ts +697 -611
- package/packages/table/module/export/hook.ts +2160 -2059
- package/packages/table/module/export/import-panel.ts +319 -279
- package/packages/table/module/export/util.ts +25 -24
- package/packages/table/module/filter/hook.ts +519 -501
- package/packages/table/module/filter/panel.ts +368 -304
- package/packages/table/module/keyboard/hook.ts +498 -494
- package/packages/table/module/menu/hook.ts +330 -330
- package/packages/table/module/menu/panel.ts +272 -201
- package/packages/table/module/validator/hook.ts +653 -635
- package/packages/table/render/index.ts +1819 -1744
- package/packages/table/src/body.ts +1078 -955
- package/packages/table/src/cell.ts +1524 -1359
- package/packages/table/src/column.ts +192 -192
- package/packages/table/src/columnInfo.ts +232 -232
- package/packages/table/src/emits.ts +134 -134
- package/packages/table/src/footer.ts +425 -380
- package/packages/table/src/group.ts +67 -63
- package/packages/table/src/header.ts +642 -581
- package/packages/table/src/props.ts +336 -336
- package/packages/table/src/store.ts +14 -14
- package/packages/table/src/table.ts +16011 -15454
- package/packages/table/src/use/cell-view.ts +41 -44
- package/packages/table/src/use/index.ts +1 -1
- package/packages/table/src/util.ts +1206 -1216
- package/packages/toolbar/index.ts +18 -18
- package/packages/toolbar/src/toolbar.ts +768 -706
- package/packages/ui/index.ts +519 -520
- package/packages/ui/src/anime.ts +51 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +466 -463
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +66 -66
- package/packages/ui/src/vn.ts +55 -55
- package/packages/v-x-e-table/index.d.ts +3 -3
- package/packages/v-x-e-table/index.ts +3 -3
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
package/es/table/src/body.js
CHANGED
|
@@ -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 {
|
|
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(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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: [
|
|
321
|
-
"
|
|
322
|
-
|
|
323
|
-
|
|
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(
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
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(
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
"
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
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(
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
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: [
|
|
388
|
-
"
|
|
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(
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
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(
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
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(
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
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(
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
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(
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
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
|
}
|