vxe-table 4.24.0-beta.1 → 4.24.0-beta.3
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 +178 -130
- package/dist/all.esm.min.js +3 -3
- package/dist/style.css +66 -26
- package/dist/style.mini.css +1 -1
- package/es/esm.index.d.ts +7 -0
- package/es/esm.index.js +8 -0
- package/es/style.css +66 -26
- package/es/style.mini.css +1 -1
- package/es/table/module/export/hook.js +4 -3
- package/es/table/src/body.js +2 -2
- package/es/table/src/cell.js +6 -6
- package/es/table/src/table.js +32 -111
- package/es/table/src/tree.d.ts +6 -0
- package/es/table/src/tree.js +96 -0
- package/es/table/style.css +64 -25
- package/es/table/style.mini.css +1 -1
- package/es/ui/index.js +5 -6
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +64 -25
- package/es/vxe-table/style.mini.css +1 -1
- package/lib/esm.index.d.ts +7 -0
- package/lib/esm.index.js +39 -0
- package/lib/index.umd.js +144 -129
- package/lib/index.umd.min.js +3 -3
- package/lib/style.css +66 -26
- package/lib/style.mini.css +1 -1
- package/lib/table/module/export/hook.js +4 -3
- package/lib/table/src/body.js +2 -2
- package/lib/table/src/cell.js +6 -6
- package/lib/table/src/table.js +32 -111
- package/lib/table/src/tree.d.ts +6 -0
- package/lib/table/src/tree.js +116 -0
- package/lib/table/style/style.css +64 -25
- package/lib/table/style/style.mini.css +1 -1
- package/lib/ui/index.js +5 -6
- package/lib/ui/src/log.js +1 -1
- package/lib/vxe-table/style/style.css +64 -25
- package/lib/vxe-table/style/style.mini.css +1 -1
- package/package.json +1 -1
- package/packages/esm.index.ts +10 -0
- package/packages/table/module/export/hook.ts +4 -3
- package/packages/table/src/body.ts +2 -2
- package/packages/table/src/cell.ts +9 -10
- package/packages/table/src/table.ts +32 -129
- package/packages/table/src/tree.ts +112 -0
- package/packages/ui/index.ts +4 -5
- package/styles/components/icon.scss +11 -3
- package/styles/components/old-icon.scss +6 -3
- package/styles/components/table.scss +3 -3
- package/styles/theme/base.scss +3 -1
- /package/dist/{iconfont.1794559626301.ttf → iconfont.1794628313365.ttf} +0 -0
- /package/dist/{iconfont.1794559626301.woff → iconfont.1794628313365.woff} +0 -0
- /package/dist/{iconfont.1794559626301.woff2 → iconfont.1794628313365.woff2} +0 -0
- /package/es/{iconfont.1794559626301.ttf → iconfont.1794628313365.ttf} +0 -0
- /package/es/{iconfont.1794559626301.woff → iconfont.1794628313365.woff} +0 -0
- /package/es/{iconfont.1794559626301.woff2 → iconfont.1794628313365.woff2} +0 -0
- /package/lib/{iconfont.1794559626301.ttf → iconfont.1794628313365.ttf} +0 -0
- /package/lib/{iconfont.1794559626301.woff → iconfont.1794628313365.woff} +0 -0
- /package/lib/{iconfont.1794559626301.woff2 → iconfont.1794628313365.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -16,6 +16,33 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
18
|
|
|
19
|
+
// packages_temp/esm.index.ts
|
|
20
|
+
var esm_index_exports = {};
|
|
21
|
+
__export(esm_index_exports, {
|
|
22
|
+
Colgroup: () => Colgroup,
|
|
23
|
+
Column: () => Column,
|
|
24
|
+
Grid: () => Grid,
|
|
25
|
+
Table: () => Table,
|
|
26
|
+
Toolbar: () => Toolbar,
|
|
27
|
+
VXETable: () => VXETable,
|
|
28
|
+
VxeColgroup: () => VxeColgroup,
|
|
29
|
+
VxeColumn: () => VxeColumn,
|
|
30
|
+
VxeGrid: () => VxeGrid,
|
|
31
|
+
VxeTable: () => VxeTable,
|
|
32
|
+
VxeToolbar: () => VxeToolbar,
|
|
33
|
+
VxeUI: () => index_exports.VxeUI,
|
|
34
|
+
_t: () => _t,
|
|
35
|
+
config: () => config,
|
|
36
|
+
default: () => esm_index_default,
|
|
37
|
+
install: () => install,
|
|
38
|
+
modal: () => modal,
|
|
39
|
+
print: () => print,
|
|
40
|
+
readFile: () => readFile,
|
|
41
|
+
saveFile: () => saveFile,
|
|
42
|
+
setup: () => setup,
|
|
43
|
+
t: () => t
|
|
44
|
+
});
|
|
45
|
+
|
|
19
46
|
// packages_temp/index.ts
|
|
20
47
|
var index_exports = {};
|
|
21
48
|
__export(index_exports, {
|
|
@@ -201,7 +228,7 @@ var modal = {
|
|
|
201
228
|
};
|
|
202
229
|
|
|
203
230
|
// packages_temp/ui/index.ts
|
|
204
|
-
var version = "4.24.0-beta.
|
|
231
|
+
var version = "4.24.0-beta.3";
|
|
205
232
|
VxeUI3.tableVersion = version;
|
|
206
233
|
VxeUI3.version = version;
|
|
207
234
|
VxeUI3.setConfig({
|
|
@@ -377,7 +404,6 @@ VxeUI3.setConfig({
|
|
|
377
404
|
parentField: "_X_ROW_PARENT_KEY",
|
|
378
405
|
childrenField: "_X_ROW_CHILDREN",
|
|
379
406
|
mapChildrenField: "_X_ROW_CHILD_LIST",
|
|
380
|
-
indent: 28,
|
|
381
407
|
showIcon: true,
|
|
382
408
|
maxGroupSize: 4,
|
|
383
409
|
showAggFuncTitle: true
|
|
@@ -389,7 +415,7 @@ VxeUI3.setConfig({
|
|
|
389
415
|
childrenField: "children",
|
|
390
416
|
hasChildField: "hasChild",
|
|
391
417
|
mapChildrenField: "_X_ROW_CHILD",
|
|
392
|
-
indent:
|
|
418
|
+
// indent: 20,
|
|
393
419
|
showIcon: true,
|
|
394
420
|
// lineType: 'dashed',
|
|
395
421
|
showRootLine: true
|
|
@@ -540,10 +566,10 @@ VxeUI3.setIcon({
|
|
|
540
566
|
TABLE_TITLE_PREFIX: iconPrefix + "question-circle-fill",
|
|
541
567
|
TABLE_TITLE_SUFFIX: iconPrefix + "question-circle-fill",
|
|
542
568
|
TABLE_TREE_LOADED: iconPrefix + "spinner roll",
|
|
543
|
-
TABLE_TREE_OPEN: iconPrefix + "caret-right
|
|
569
|
+
TABLE_TREE_OPEN: iconPrefix + "caret-right rotate-90",
|
|
544
570
|
TABLE_TREE_CLOSE: iconPrefix + "caret-right",
|
|
545
571
|
TABLE_EXPAND_LOADED: iconPrefix + "spinner roll",
|
|
546
|
-
TABLE_EXPAND_OPEN: iconPrefix + "arrow-right
|
|
572
|
+
TABLE_EXPAND_OPEN: iconPrefix + "arrow-right rotate-90",
|
|
547
573
|
TABLE_EXPAND_CLOSE: iconPrefix + "arrow-right",
|
|
548
574
|
TABLE_CHECKBOX_CHECKED: iconPrefix + "checkbox-checked-fill",
|
|
549
575
|
TABLE_CHECKBOX_UNCHECKED: iconPrefix + "checkbox-unchecked",
|
|
@@ -572,7 +598,7 @@ VxeUI3.setIcon({
|
|
|
572
598
|
TABLE_DRAG_STATUS_AGG_VALUES: iconPrefix + "values",
|
|
573
599
|
TABLE_DRAG_STATUS_COLUMN: iconPrefix + "swap",
|
|
574
600
|
TABLE_DRAG_DISABLED: iconPrefix + "no-drop",
|
|
575
|
-
TABLE_ROW_GROUP_OPEN: iconPrefix + "arrow-right
|
|
601
|
+
TABLE_ROW_GROUP_OPEN: iconPrefix + "arrow-right rotate-90",
|
|
576
602
|
TABLE_ROW_GROUP_CLOSE: iconPrefix + "arrow-right",
|
|
577
603
|
TABLE_AGGREGATE_GROUPING: iconPrefix + "grouping",
|
|
578
604
|
TABLE_AGGREGATE_VALUES: iconPrefix + "values",
|
|
@@ -954,7 +980,7 @@ function getPopupAppendElement(appendTo) {
|
|
|
954
980
|
// packages_temp/ui/src/log.ts
|
|
955
981
|
import { VxeUI as VxeUI4 } from "@vxe-ui/core";
|
|
956
982
|
var { log } = VxeUI4;
|
|
957
|
-
var tableVersion = `table v${"4.24.0-beta.
|
|
983
|
+
var tableVersion = `table v${"4.24.0-beta.3"}`;
|
|
958
984
|
function createComponentLog(name) {
|
|
959
985
|
const uiVersion = VxeUI4.uiVersion ? `ui v${VxeUI4.uiVersion}` : "";
|
|
960
986
|
const ganttVersion = VxeUI4.ganttVersion ? `gantt v${VxeUI4.ganttVersion}` : "";
|
|
@@ -2821,7 +2847,7 @@ var Cell = {
|
|
|
2821
2847
|
const { rowGroupExpandedFlag } = tableReactData;
|
|
2822
2848
|
const { rowGroupExpandedMaps } = tableInternalData;
|
|
2823
2849
|
const aggregateOpts = computeAggregateOpts.value;
|
|
2824
|
-
const { mode, padding,
|
|
2850
|
+
const { mode, padding, showIcon, iconOpen, iconClose } = aggregateOpts;
|
|
2825
2851
|
const rowid = getRowid($table, row);
|
|
2826
2852
|
const isExpand = !!rowGroupExpandedFlag && !!rowGroupExpandedMaps[rowid];
|
|
2827
2853
|
return h(
|
|
@@ -2833,8 +2859,8 @@ var Cell = {
|
|
|
2833
2859
|
"is--expanded": isExpand
|
|
2834
2860
|
}
|
|
2835
2861
|
],
|
|
2836
|
-
style: mode !== "column" && padding
|
|
2837
|
-
paddingLeft:
|
|
2862
|
+
style: mode !== "column" && padding ? {
|
|
2863
|
+
paddingLeft: `calc(${level} * var(--vxe-ui-table-row-group-tree-node-indent))`
|
|
2838
2864
|
} : void 0
|
|
2839
2865
|
},
|
|
2840
2866
|
[
|
|
@@ -2879,7 +2905,7 @@ var Cell = {
|
|
|
2879
2905
|
const { treeExpandedFlag } = tableReactData;
|
|
2880
2906
|
const { fullAllDataRowIdData, treeExpandedMaps, treeExpandLazyLoadedMaps } = tableInternalData;
|
|
2881
2907
|
const treeOpts = computeTreeOpts.value;
|
|
2882
|
-
const { padding,
|
|
2908
|
+
const { padding, lazy, trigger, visibleMethod, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
|
|
2883
2909
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
2884
2910
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
2885
2911
|
const rowChilds = row[childrenField];
|
|
@@ -2913,8 +2939,8 @@ var Cell = {
|
|
|
2913
2939
|
"is--active": isActive
|
|
2914
2940
|
}
|
|
2915
2941
|
],
|
|
2916
|
-
style: padding
|
|
2917
|
-
paddingLeft:
|
|
2942
|
+
style: padding ? {
|
|
2943
|
+
paddingLeft: `calc(${level} * var(--vxe-ui-table-tree-node-indent))`
|
|
2918
2944
|
} : void 0
|
|
2919
2945
|
},
|
|
2920
2946
|
[
|
|
@@ -4510,6 +4536,101 @@ function clearColAnimate(elem, clss) {
|
|
|
4510
4536
|
}, 500);
|
|
4511
4537
|
}
|
|
4512
4538
|
|
|
4539
|
+
// packages_temp/table/src/tree.ts
|
|
4540
|
+
function getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow, showRootLine) {
|
|
4541
|
+
const lines = [];
|
|
4542
|
+
for (let col = 1; col <= depth; col++) {
|
|
4543
|
+
const leftVal = `var(--vxe-ui-table-tree-node-btn-width) + var(--vxe-ui-table-tree-node-indent) * ${col - 1}`;
|
|
4544
|
+
const through = (linesMask & 1 << col - 1) !== 0;
|
|
4545
|
+
if (col === 1 && !showRootLine) {
|
|
4546
|
+
continue;
|
|
4547
|
+
}
|
|
4548
|
+
if (col < depth) {
|
|
4549
|
+
if (through) {
|
|
4550
|
+
let top = "0";
|
|
4551
|
+
let height = "100%";
|
|
4552
|
+
if (isFirstRow) {
|
|
4553
|
+
top = "50%";
|
|
4554
|
+
height = "50%";
|
|
4555
|
+
} else if (isLastRow) {
|
|
4556
|
+
top = "0";
|
|
4557
|
+
height = "50%";
|
|
4558
|
+
}
|
|
4559
|
+
lines.push({
|
|
4560
|
+
type: "v",
|
|
4561
|
+
style: {
|
|
4562
|
+
left: `calc(${leftVal})`,
|
|
4563
|
+
top,
|
|
4564
|
+
height
|
|
4565
|
+
}
|
|
4566
|
+
});
|
|
4567
|
+
}
|
|
4568
|
+
} else {
|
|
4569
|
+
let vTop = "0";
|
|
4570
|
+
let vHeight = through ? "100%" : "50%";
|
|
4571
|
+
if (isFirstRow && isLastRow) {
|
|
4572
|
+
vTop = "50%";
|
|
4573
|
+
vHeight = "0px";
|
|
4574
|
+
} else if (isFirstRow) {
|
|
4575
|
+
vTop = "50%";
|
|
4576
|
+
vHeight = "50%";
|
|
4577
|
+
} else if (isLastRow) {
|
|
4578
|
+
vTop = "0";
|
|
4579
|
+
vHeight = "50%";
|
|
4580
|
+
}
|
|
4581
|
+
if (isExpandable && vHeight !== "0px") {
|
|
4582
|
+
let cutType = "v cut";
|
|
4583
|
+
if (vTop === "0" && vHeight === "50%") {
|
|
4584
|
+
cutType = "v cut-top";
|
|
4585
|
+
} else if (vTop === "50%" && vHeight === "50%") {
|
|
4586
|
+
cutType = "v cut-bottom";
|
|
4587
|
+
} else if (vHeight === "100%") {
|
|
4588
|
+
cutType = "v cut-full";
|
|
4589
|
+
}
|
|
4590
|
+
lines.push({
|
|
4591
|
+
type: cutType,
|
|
4592
|
+
style: {
|
|
4593
|
+
left: `calc(${leftVal})`,
|
|
4594
|
+
top: vTop,
|
|
4595
|
+
height: vHeight
|
|
4596
|
+
}
|
|
4597
|
+
});
|
|
4598
|
+
} else {
|
|
4599
|
+
if (vHeight !== "0px") {
|
|
4600
|
+
lines.push({
|
|
4601
|
+
type: "v",
|
|
4602
|
+
style: {
|
|
4603
|
+
left: `calc(${leftVal})`,
|
|
4604
|
+
top: vTop,
|
|
4605
|
+
height: vHeight
|
|
4606
|
+
}
|
|
4607
|
+
});
|
|
4608
|
+
}
|
|
4609
|
+
}
|
|
4610
|
+
if (isExpandable) {
|
|
4611
|
+
lines.push({
|
|
4612
|
+
type: "h",
|
|
4613
|
+
style: {
|
|
4614
|
+
left: `calc(${leftVal} + var(--vxe-ui-table-tree-node-btn-width) / 2 + 1px)`,
|
|
4615
|
+
top: "50%",
|
|
4616
|
+
width: "calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width) - 0.2em)"
|
|
4617
|
+
}
|
|
4618
|
+
});
|
|
4619
|
+
} else {
|
|
4620
|
+
lines.push({
|
|
4621
|
+
type: "h",
|
|
4622
|
+
style: {
|
|
4623
|
+
left: `calc(${leftVal})`,
|
|
4624
|
+
top: "50%",
|
|
4625
|
+
width: "calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width) / 2 - 0.1em)"
|
|
4626
|
+
}
|
|
4627
|
+
});
|
|
4628
|
+
}
|
|
4629
|
+
}
|
|
4630
|
+
}
|
|
4631
|
+
return lines;
|
|
4632
|
+
}
|
|
4633
|
+
|
|
4513
4634
|
// packages_temp/table/src/store.ts
|
|
4514
4635
|
import { reactive as reactive2 } from "vue";
|
|
4515
4636
|
var crossTableDragRowInfo = reactive2({
|
|
@@ -4599,7 +4720,7 @@ var body_default = (
|
|
|
4599
4720
|
lineVNs.push(
|
|
4600
4721
|
h4("span", {
|
|
4601
4722
|
key: "le" + i,
|
|
4602
|
-
class: ["vxe-tree
|
|
4723
|
+
class: ["vxe-table--tree-node-line", `type--${lineType || "solid"}`, item.type],
|
|
4603
4724
|
style: item.style
|
|
4604
4725
|
})
|
|
4605
4726
|
);
|
|
@@ -5147,7 +5268,7 @@ var body_default = (
|
|
|
5147
5268
|
cellStyle.height = `${expandHeight}px`;
|
|
5148
5269
|
}
|
|
5149
5270
|
if (treeConfig) {
|
|
5150
|
-
cellStyle.paddingLeft =
|
|
5271
|
+
cellStyle.paddingLeft = `calc(${rowLevel} * var(--vxe-ui-table-tree-node-indent) + 30px)`;
|
|
5151
5272
|
}
|
|
5152
5273
|
const { showOverflow } = expandColumn || {};
|
|
5153
5274
|
const colid = expandColumn.id;
|
|
@@ -12367,6 +12488,7 @@ hooks4.add("tableExportModule", {
|
|
|
12367
12488
|
const { isAllSelected, isIndeterminate } = reactData;
|
|
12368
12489
|
const { mergeBodyCellMaps, mergeFooterCellMaps } = internalData;
|
|
12369
12490
|
const treeOpts = computeTreeOpts.value;
|
|
12491
|
+
const treeIndent = treeOpts.indent || 20;
|
|
12370
12492
|
const { print: isPrint, widthMode, isHeader, isFooter, isColgroup, isMerge, colgroups, _columnConfs, original } = opts;
|
|
12371
12493
|
const isAutoWidth = widthMode === "auto";
|
|
12372
12494
|
const isScaleWidth = widthMode === "scale";
|
|
@@ -12509,11 +12631,11 @@ hooks4.add("tableExportModule", {
|
|
|
12509
12631
|
}
|
|
12510
12632
|
classNames.push("vxe-table--tree-node");
|
|
12511
12633
|
if (column.type === "radio") {
|
|
12512
|
-
return `<td class="${classNames.join(" ")}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level *
|
|
12634
|
+
return `<td class="${classNames.join(" ")}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level * treeIndent}px"><div class="vxe-table--tree-icon-wrapper">${treeIcon}</div><div class="vxe-table--tree-cell"><input type="radio" name="radio_${id}" ${item._radioDisabled ? "disabled " : ""}${getBooleanValue(cellValue) ? "checked" : ""}><span>${item._radioLabel}</span></div></div></div></td>`;
|
|
12513
12635
|
} else if (column.type === "checkbox") {
|
|
12514
|
-
return `<td class="${classNames.join(" ")}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level *
|
|
12636
|
+
return `<td class="${classNames.join(" ")}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level * treeIndent}px"><div class="vxe-table--tree-icon-wrapper">${treeIcon}</div><div class="vxe-table--tree-cell"><input type="checkbox" ${item._checkboxDisabled ? "disabled " : ""}${getBooleanValue(cellValue) ? "checked" : ""}><span>${item._checkboxLabel}</span></div></div></div></td>`;
|
|
12515
12637
|
}
|
|
12516
|
-
return `<td class="${classNames.join(" ")}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level *
|
|
12638
|
+
return `<td class="${classNames.join(" ")}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level * treeIndent}px"><div class="vxe-table--tree-icon-wrapper">${treeIcon}</div><div class="vxe-table--tree-cell">${cellValue}</div></div></div></td>`;
|
|
12517
12639
|
}
|
|
12518
12640
|
if (column.type === "radio") {
|
|
12519
12641
|
return `<td class="${classNames.join(" ")}"><div style="${getCellWidthStyle(column)}"><input type="radio" name="radio_${id}" ${item._radioDisabled ? "disabled " : ""}${getBooleanValue(cellValue) ? "checked" : ""}><span>${item._radioLabel}</span></div></td>`;
|
|
@@ -17363,11 +17485,14 @@ var table_default = (
|
|
|
17363
17485
|
return "";
|
|
17364
17486
|
});
|
|
17365
17487
|
const computeTableStyle = computed4(() => {
|
|
17366
|
-
const { treeConfig } = props;
|
|
17367
17488
|
const barWidth = computeScrollYWidth.value;
|
|
17368
17489
|
const barHeight = computeScrollXHeight.value;
|
|
17369
17490
|
const treeOpts = computeTreeOpts.value;
|
|
17370
|
-
const { indent, lineWidth, lineColor } = treeOpts;
|
|
17491
|
+
const { indent: treeIndent, lineWidth, lineColor } = treeOpts;
|
|
17492
|
+
const expandOpts = computeExpandOpts.value;
|
|
17493
|
+
const { indent: edIndent } = expandOpts;
|
|
17494
|
+
const aggregateOpts = computeAggregateOpts.value;
|
|
17495
|
+
const { indent: rgIndent } = aggregateOpts;
|
|
17371
17496
|
const stys = {};
|
|
17372
17497
|
if (barWidth || barHeight) {
|
|
17373
17498
|
stys["--vxe-ui-table-view-scrollbar-width"] = toCssUnit(barWidth || barHeight);
|
|
@@ -17375,8 +17500,14 @@ var table_default = (
|
|
|
17375
17500
|
stys["--vxe-ui-table-view-scrollbar-height"] = toCssUnit(barHeight || barWidth);
|
|
17376
17501
|
stys["--vxe-ui-scrollbar-x-height"] = toCssUnit(barHeight || barWidth);
|
|
17377
17502
|
}
|
|
17378
|
-
if (
|
|
17379
|
-
stys["--vxe-ui-table-tree-node-indent"] = toCssUnit(
|
|
17503
|
+
if (edIndent) {
|
|
17504
|
+
stys["--vxe-ui-table-expand-tree-node-indent"] = toCssUnit(edIndent);
|
|
17505
|
+
}
|
|
17506
|
+
if (rgIndent) {
|
|
17507
|
+
stys["--vxe-ui-table-row-group-tree-node-indent"] = toCssUnit(rgIndent);
|
|
17508
|
+
}
|
|
17509
|
+
if (treeIndent) {
|
|
17510
|
+
stys["--vxe-ui-table-tree-node-indent"] = toCssUnit(treeIndent);
|
|
17380
17511
|
}
|
|
17381
17512
|
if (lineWidth) {
|
|
17382
17513
|
stys["--vxe-ui-table-tree-node-line-width"] = toCssUnit(lineWidth);
|
|
@@ -17629,6 +17760,7 @@ var table_default = (
|
|
|
17629
17760
|
computeExpandOpts,
|
|
17630
17761
|
computeTreeOpts,
|
|
17631
17762
|
computeShowTreeLine,
|
|
17763
|
+
computeShowTreeRootLine,
|
|
17632
17764
|
computeEmptyOpts,
|
|
17633
17765
|
computeLoadingOpts,
|
|
17634
17766
|
computeCellOffsetWidth,
|
|
@@ -18875,109 +19007,17 @@ var table_default = (
|
|
|
18875
19007
|
return cellValue;
|
|
18876
19008
|
};
|
|
18877
19009
|
};
|
|
18878
|
-
function getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow, showRootLine) {
|
|
18879
|
-
const lines = [];
|
|
18880
|
-
for (let col = 1; col <= depth; col++) {
|
|
18881
|
-
const leftVal = `var(--vxe-ui-table-tree-node-btn-width) + var(--vxe-ui-table-tree-node-indent) * ${col - 1}`;
|
|
18882
|
-
const through = (linesMask & 1 << col - 1) !== 0;
|
|
18883
|
-
if (col === 1 && !showRootLine) {
|
|
18884
|
-
continue;
|
|
18885
|
-
}
|
|
18886
|
-
if (col < depth) {
|
|
18887
|
-
if (through) {
|
|
18888
|
-
let top = "0";
|
|
18889
|
-
let height = "100%";
|
|
18890
|
-
if (isFirstRow) {
|
|
18891
|
-
top = "50%";
|
|
18892
|
-
height = "50%";
|
|
18893
|
-
} else if (isLastRow) {
|
|
18894
|
-
top = "0";
|
|
18895
|
-
height = "50%";
|
|
18896
|
-
}
|
|
18897
|
-
lines.push({
|
|
18898
|
-
type: "v",
|
|
18899
|
-
style: {
|
|
18900
|
-
left: `calc(${leftVal})`,
|
|
18901
|
-
top,
|
|
18902
|
-
height
|
|
18903
|
-
}
|
|
18904
|
-
});
|
|
18905
|
-
}
|
|
18906
|
-
} else {
|
|
18907
|
-
let vTop = "0";
|
|
18908
|
-
let vHeight = through ? "100%" : "50%";
|
|
18909
|
-
if (isFirstRow && isLastRow) {
|
|
18910
|
-
vTop = "50%";
|
|
18911
|
-
vHeight = "0px";
|
|
18912
|
-
} else if (isFirstRow) {
|
|
18913
|
-
vTop = "50%";
|
|
18914
|
-
vHeight = "50%";
|
|
18915
|
-
} else if (isLastRow) {
|
|
18916
|
-
vTop = "0";
|
|
18917
|
-
vHeight = "50%";
|
|
18918
|
-
}
|
|
18919
|
-
if (isExpandable && vHeight !== "0px") {
|
|
18920
|
-
let cutType = "v cut";
|
|
18921
|
-
if (vTop === "0" && vHeight === "50%") {
|
|
18922
|
-
cutType = "v cut-top";
|
|
18923
|
-
} else if (vTop === "50%" && vHeight === "50%") {
|
|
18924
|
-
cutType = "v cut-bottom";
|
|
18925
|
-
} else if (vHeight === "100%") {
|
|
18926
|
-
cutType = "v cut-full";
|
|
18927
|
-
}
|
|
18928
|
-
lines.push({
|
|
18929
|
-
type: cutType,
|
|
18930
|
-
style: {
|
|
18931
|
-
left: `calc(${leftVal})`,
|
|
18932
|
-
top: vTop,
|
|
18933
|
-
height: vHeight
|
|
18934
|
-
}
|
|
18935
|
-
});
|
|
18936
|
-
} else {
|
|
18937
|
-
if (vHeight !== "0px") {
|
|
18938
|
-
lines.push({
|
|
18939
|
-
type: "v",
|
|
18940
|
-
style: {
|
|
18941
|
-
left: `calc(${leftVal})`,
|
|
18942
|
-
top: vTop,
|
|
18943
|
-
height: vHeight
|
|
18944
|
-
}
|
|
18945
|
-
});
|
|
18946
|
-
}
|
|
18947
|
-
}
|
|
18948
|
-
if (isExpandable) {
|
|
18949
|
-
lines.push({
|
|
18950
|
-
type: "h",
|
|
18951
|
-
style: {
|
|
18952
|
-
left: `calc(${leftVal} + var(--vxe-ui-table-tree-node-btn-width) / 2 + 1px)`,
|
|
18953
|
-
top: "50%",
|
|
18954
|
-
width: "calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width) - 0.25em)"
|
|
18955
|
-
}
|
|
18956
|
-
});
|
|
18957
|
-
} else {
|
|
18958
|
-
lines.push({
|
|
18959
|
-
type: "h",
|
|
18960
|
-
style: {
|
|
18961
|
-
left: `calc(${leftVal})`,
|
|
18962
|
-
top: "50%",
|
|
18963
|
-
width: "calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width))"
|
|
18964
|
-
}
|
|
18965
|
-
});
|
|
18966
|
-
}
|
|
18967
|
-
}
|
|
18968
|
-
}
|
|
18969
|
-
return lines;
|
|
18970
|
-
}
|
|
18971
19010
|
const updateAfterTreeIndex = () => {
|
|
18972
19011
|
const { fullDataRowIdData, fullAllDataRowIdData, afterFullData, afterTreeFullData } = internalData;
|
|
18973
19012
|
const treeOpts = computeTreeOpts.value;
|
|
18974
|
-
const { lazy, transform,
|
|
19013
|
+
const { lazy, transform, mapChildrenField } = treeOpts;
|
|
18975
19014
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
18976
19015
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
18977
19016
|
const showTreeLine = computeShowTreeLine.value;
|
|
19017
|
+
const showTreeRootLine = computeShowTreeRootLine.value;
|
|
18978
19018
|
const fullMaps = {};
|
|
18979
19019
|
const treeFullSize = afterTreeFullData.length;
|
|
18980
|
-
|
|
19020
|
+
let rowNum = 0;
|
|
18981
19021
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
18982
19022
|
function handleTreeDFS(row, index, items, parentRow, depth, isFirstRow, isLastRow, isLastChild, stackMask, seq) {
|
|
18983
19023
|
const rowid = handleGetRowId(row);
|
|
@@ -18985,22 +19025,19 @@ var table_default = (
|
|
|
18985
19025
|
const rowChilds = row[transform ? mapChildrenField : childrenField];
|
|
18986
19026
|
if (rowRest) {
|
|
18987
19027
|
rowRest.seq = seq;
|
|
18988
|
-
rowRest._seq = rowNum;
|
|
18989
19028
|
rowRest.items = items;
|
|
18990
19029
|
rowRest.treeIndex = index;
|
|
18991
|
-
rowRest._index = rowNum;
|
|
18992
|
-
rowRest._tIndex = rowNum;
|
|
18993
19030
|
} else {
|
|
18994
19031
|
rowRest = {
|
|
18995
19032
|
row,
|
|
18996
19033
|
rowid,
|
|
18997
|
-
_seq:
|
|
18998
|
-
seq,
|
|
19034
|
+
_seq: 0,
|
|
19035
|
+
seq: 0,
|
|
18999
19036
|
index,
|
|
19000
19037
|
$index: -1,
|
|
19001
|
-
_index:
|
|
19038
|
+
_index: 0,
|
|
19002
19039
|
treeIndex: index,
|
|
19003
|
-
_tIndex:
|
|
19040
|
+
_tIndex: 0,
|
|
19004
19041
|
items,
|
|
19005
19042
|
parent: parentRow,
|
|
19006
19043
|
level: 0,
|
|
@@ -19019,6 +19056,8 @@ var table_default = (
|
|
|
19019
19056
|
}
|
|
19020
19057
|
rowRest.seq = seq;
|
|
19021
19058
|
rowRest._seq = rowNum;
|
|
19059
|
+
rowRest._index = rowNum;
|
|
19060
|
+
rowRest._tIndex = rowNum;
|
|
19022
19061
|
rowRest.level = depth - 1;
|
|
19023
19062
|
rowRest.linesMask = linesMask;
|
|
19024
19063
|
const hasChild = rowChilds && rowChilds.length;
|
|
@@ -19030,14 +19069,17 @@ var table_default = (
|
|
|
19030
19069
|
isLazyLoaded = !!rest.treeLoaded;
|
|
19031
19070
|
}
|
|
19032
19071
|
const isExpandable = lazy ? isLazyLoaded ? hasChild : hasChild || hasLazyChilds : hasChild;
|
|
19033
|
-
rowRest.treeLines = showTreeLine && treeFullSize > 1 ? getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow,
|
|
19072
|
+
rowRest.treeLines = showTreeLine && treeFullSize > 1 ? getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow, showTreeRootLine) : [];
|
|
19034
19073
|
let nextStackMask = stackMask;
|
|
19035
19074
|
if (!isLastChild) {
|
|
19036
19075
|
nextStackMask |= 1 << depth;
|
|
19037
19076
|
}
|
|
19077
|
+
rowNum++;
|
|
19038
19078
|
fullMaps[rowid] = row;
|
|
19039
|
-
|
|
19040
|
-
|
|
19079
|
+
if (rowChilds) {
|
|
19080
|
+
for (let i = 0; i < rowChilds.length; i++) {
|
|
19081
|
+
handleTreeDFS(rowChilds[i], i, rowChilds, row, depth + 1, false, false, i === rowChilds.length - 1, nextStackMask, `${seq}.${i + 1}`);
|
|
19082
|
+
}
|
|
19041
19083
|
}
|
|
19042
19084
|
}
|
|
19043
19085
|
for (let i = 0; i < treeFullSize; i++) {
|
|
@@ -30160,7 +30202,7 @@ var table_default = (
|
|
|
30160
30202
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
30161
30203
|
tableRowExpandedList.forEach((row) => {
|
|
30162
30204
|
const expandOpts2 = computeExpandOpts.value;
|
|
30163
|
-
const { height: expandHeight, padding
|
|
30205
|
+
const { height: expandHeight, padding } = expandOpts2;
|
|
30164
30206
|
const { fullAllDataRowIdData, fullColumnIdData } = internalData;
|
|
30165
30207
|
const treeOpts = computeTreeOpts.value;
|
|
30166
30208
|
const { transform, seqMode } = treeOpts;
|
|
@@ -30190,7 +30232,7 @@ var table_default = (
|
|
|
30190
30232
|
cellStyle.height = `${expandHeight}px`;
|
|
30191
30233
|
}
|
|
30192
30234
|
if (isRowGroupStatus || treeConfig) {
|
|
30193
|
-
cellStyle.paddingLeft =
|
|
30235
|
+
cellStyle.paddingLeft = `calc(${rowLevel} * var(--vxe-ui-table-expand-tree-node-indent) + 30px)`;
|
|
30194
30236
|
}
|
|
30195
30237
|
let columnIndex = -1;
|
|
30196
30238
|
let $columnIndex = -1;
|
|
@@ -35391,6 +35433,11 @@ if (typeof window !== "undefined") {
|
|
|
35391
35433
|
}
|
|
35392
35434
|
}
|
|
35393
35435
|
var index_default = components_exports;
|
|
35436
|
+
|
|
35437
|
+
// packages_temp/esm.index.ts
|
|
35438
|
+
__reExport(esm_index_exports, index_exports);
|
|
35439
|
+
var esm_index_default = index_exports;
|
|
35440
|
+
var export_VxeUI = index_exports.VxeUI;
|
|
35394
35441
|
export {
|
|
35395
35442
|
Colgroup,
|
|
35396
35443
|
Column,
|
|
@@ -35403,9 +35450,10 @@ export {
|
|
|
35403
35450
|
VxeGrid,
|
|
35404
35451
|
VxeTable,
|
|
35405
35452
|
VxeToolbar,
|
|
35453
|
+
export_VxeUI as VxeUI,
|
|
35406
35454
|
_t,
|
|
35407
35455
|
config,
|
|
35408
|
-
|
|
35456
|
+
esm_index_default as default,
|
|
35409
35457
|
install,
|
|
35410
35458
|
modal,
|
|
35411
35459
|
print,
|