vxe-table 4.24.0-beta.2 → 4.24.0-beta.4
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 +144 -129
- package/dist/all.esm.min.js +3 -3
- package/dist/style.css +90 -34
- package/dist/style.mini.css +1 -1
- package/es/style.css +90 -34
- 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 +78 -26
- 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 +78 -26
- package/es/vxe-table/style.mini.css +1 -1
- package/lib/index.umd.js +144 -129
- package/lib/index.umd.min.js +3 -3
- package/lib/style.css +90 -34
- 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 +78 -26
- 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 +78 -26
- package/lib/vxe-table/style/style.mini.css +1 -1
- package/package.json +2 -2
- 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 +14 -4
- package/styles/theme/base.scss +13 -9
- /package/dist/{iconfont.1794563906464.ttf → iconfont.1794794325954.ttf} +0 -0
- /package/dist/{iconfont.1794563906464.woff → iconfont.1794794325954.woff} +0 -0
- /package/dist/{iconfont.1794563906464.woff2 → iconfont.1794794325954.woff2} +0 -0
- /package/es/{iconfont.1794563906464.ttf → iconfont.1794794325954.ttf} +0 -0
- /package/es/{iconfont.1794563906464.woff → iconfont.1794794325954.woff} +0 -0
- /package/es/{iconfont.1794563906464.woff2 → iconfont.1794794325954.woff2} +0 -0
- /package/lib/{iconfont.1794563906464.ttf → iconfont.1794794325954.ttf} +0 -0
- /package/lib/{iconfont.1794563906464.woff → iconfont.1794794325954.woff} +0 -0
- /package/lib/{iconfont.1794563906464.woff2 → iconfont.1794794325954.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -396,7 +396,7 @@ var modal = {
|
|
|
396
396
|
};
|
|
397
397
|
|
|
398
398
|
// packages_temp/ui/index.ts
|
|
399
|
-
var version = "4.24.0-beta.
|
|
399
|
+
var version = "4.24.0-beta.4";
|
|
400
400
|
import_core3.VxeUI.tableVersion = version;
|
|
401
401
|
import_core3.VxeUI.version = version;
|
|
402
402
|
import_core3.VxeUI.setConfig({
|
|
@@ -572,7 +572,6 @@ import_core3.VxeUI.setConfig({
|
|
|
572
572
|
parentField: "_X_ROW_PARENT_KEY",
|
|
573
573
|
childrenField: "_X_ROW_CHILDREN",
|
|
574
574
|
mapChildrenField: "_X_ROW_CHILD_LIST",
|
|
575
|
-
indent: 28,
|
|
576
575
|
showIcon: true,
|
|
577
576
|
maxGroupSize: 4,
|
|
578
577
|
showAggFuncTitle: true
|
|
@@ -584,7 +583,7 @@ import_core3.VxeUI.setConfig({
|
|
|
584
583
|
childrenField: "children",
|
|
585
584
|
hasChildField: "hasChild",
|
|
586
585
|
mapChildrenField: "_X_ROW_CHILD",
|
|
587
|
-
indent:
|
|
586
|
+
// indent: 20,
|
|
588
587
|
showIcon: true,
|
|
589
588
|
// lineType: 'dashed',
|
|
590
589
|
showRootLine: true
|
|
@@ -735,10 +734,10 @@ import_core3.VxeUI.setIcon({
|
|
|
735
734
|
TABLE_TITLE_PREFIX: iconPrefix + "question-circle-fill",
|
|
736
735
|
TABLE_TITLE_SUFFIX: iconPrefix + "question-circle-fill",
|
|
737
736
|
TABLE_TREE_LOADED: iconPrefix + "spinner roll",
|
|
738
|
-
TABLE_TREE_OPEN: iconPrefix + "caret-right
|
|
737
|
+
TABLE_TREE_OPEN: iconPrefix + "caret-right rotate-90",
|
|
739
738
|
TABLE_TREE_CLOSE: iconPrefix + "caret-right",
|
|
740
739
|
TABLE_EXPAND_LOADED: iconPrefix + "spinner roll",
|
|
741
|
-
TABLE_EXPAND_OPEN: iconPrefix + "arrow-right
|
|
740
|
+
TABLE_EXPAND_OPEN: iconPrefix + "arrow-right rotate-90",
|
|
742
741
|
TABLE_EXPAND_CLOSE: iconPrefix + "arrow-right",
|
|
743
742
|
TABLE_CHECKBOX_CHECKED: iconPrefix + "checkbox-checked-fill",
|
|
744
743
|
TABLE_CHECKBOX_UNCHECKED: iconPrefix + "checkbox-unchecked",
|
|
@@ -767,7 +766,7 @@ import_core3.VxeUI.setIcon({
|
|
|
767
766
|
TABLE_DRAG_STATUS_AGG_VALUES: iconPrefix + "values",
|
|
768
767
|
TABLE_DRAG_STATUS_COLUMN: iconPrefix + "swap",
|
|
769
768
|
TABLE_DRAG_DISABLED: iconPrefix + "no-drop",
|
|
770
|
-
TABLE_ROW_GROUP_OPEN: iconPrefix + "arrow-right
|
|
769
|
+
TABLE_ROW_GROUP_OPEN: iconPrefix + "arrow-right rotate-90",
|
|
771
770
|
TABLE_ROW_GROUP_CLOSE: iconPrefix + "arrow-right",
|
|
772
771
|
TABLE_AGGREGATE_GROUPING: iconPrefix + "grouping",
|
|
773
772
|
TABLE_AGGREGATE_VALUES: iconPrefix + "values",
|
|
@@ -1149,7 +1148,7 @@ function getPopupAppendElement(appendTo) {
|
|
|
1149
1148
|
// packages_temp/ui/src/log.ts
|
|
1150
1149
|
var import_core4 = require("@vxe-ui/core");
|
|
1151
1150
|
var { log } = import_core4.VxeUI;
|
|
1152
|
-
var tableVersion = `table v${"4.24.0-beta.
|
|
1151
|
+
var tableVersion = `table v${"4.24.0-beta.4"}`;
|
|
1153
1152
|
function createComponentLog(name) {
|
|
1154
1153
|
const uiVersion = import_core4.VxeUI.uiVersion ? `ui v${import_core4.VxeUI.uiVersion}` : "";
|
|
1155
1154
|
const ganttVersion = import_core4.VxeUI.ganttVersion ? `gantt v${import_core4.VxeUI.ganttVersion}` : "";
|
|
@@ -3016,7 +3015,7 @@ var Cell = {
|
|
|
3016
3015
|
const { rowGroupExpandedFlag } = tableReactData;
|
|
3017
3016
|
const { rowGroupExpandedMaps } = tableInternalData;
|
|
3018
3017
|
const aggregateOpts = computeAggregateOpts.value;
|
|
3019
|
-
const { mode, padding,
|
|
3018
|
+
const { mode, padding, showIcon, iconOpen, iconClose } = aggregateOpts;
|
|
3020
3019
|
const rowid = getRowid($table, row);
|
|
3021
3020
|
const isExpand = !!rowGroupExpandedFlag && !!rowGroupExpandedMaps[rowid];
|
|
3022
3021
|
return (0, import_vue3.h)(
|
|
@@ -3028,8 +3027,8 @@ var Cell = {
|
|
|
3028
3027
|
"is--expanded": isExpand
|
|
3029
3028
|
}
|
|
3030
3029
|
],
|
|
3031
|
-
style: mode !== "column" && padding
|
|
3032
|
-
paddingLeft:
|
|
3030
|
+
style: mode !== "column" && padding ? {
|
|
3031
|
+
paddingLeft: `calc(${level} * var(--vxe-ui-table-row-group-tree-node-indent))`
|
|
3033
3032
|
} : void 0
|
|
3034
3033
|
},
|
|
3035
3034
|
[
|
|
@@ -3074,7 +3073,7 @@ var Cell = {
|
|
|
3074
3073
|
const { treeExpandedFlag } = tableReactData;
|
|
3075
3074
|
const { fullAllDataRowIdData, treeExpandedMaps, treeExpandLazyLoadedMaps } = tableInternalData;
|
|
3076
3075
|
const treeOpts = computeTreeOpts.value;
|
|
3077
|
-
const { padding,
|
|
3076
|
+
const { padding, lazy, trigger, visibleMethod, iconLoaded, showIcon, iconOpen, iconClose } = treeOpts;
|
|
3078
3077
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
3079
3078
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
3080
3079
|
const rowChilds = row[childrenField];
|
|
@@ -3108,8 +3107,8 @@ var Cell = {
|
|
|
3108
3107
|
"is--active": isActive
|
|
3109
3108
|
}
|
|
3110
3109
|
],
|
|
3111
|
-
style: padding
|
|
3112
|
-
paddingLeft:
|
|
3110
|
+
style: padding ? {
|
|
3111
|
+
paddingLeft: `calc(${level} * var(--vxe-ui-table-tree-node-indent))`
|
|
3113
3112
|
} : void 0
|
|
3114
3113
|
},
|
|
3115
3114
|
[
|
|
@@ -4705,6 +4704,101 @@ function clearColAnimate(elem, clss) {
|
|
|
4705
4704
|
}, 500);
|
|
4706
4705
|
}
|
|
4707
4706
|
|
|
4707
|
+
// packages_temp/table/src/tree.ts
|
|
4708
|
+
function getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow, showRootLine) {
|
|
4709
|
+
const lines = [];
|
|
4710
|
+
for (let col = 1; col <= depth; col++) {
|
|
4711
|
+
const leftVal = `var(--vxe-ui-table-tree-node-btn-width) + var(--vxe-ui-table-tree-node-indent) * ${col - 1}`;
|
|
4712
|
+
const through = (linesMask & 1 << col - 1) !== 0;
|
|
4713
|
+
if (col === 1 && !showRootLine) {
|
|
4714
|
+
continue;
|
|
4715
|
+
}
|
|
4716
|
+
if (col < depth) {
|
|
4717
|
+
if (through) {
|
|
4718
|
+
let top = "0";
|
|
4719
|
+
let height = "100%";
|
|
4720
|
+
if (isFirstRow) {
|
|
4721
|
+
top = "50%";
|
|
4722
|
+
height = "50%";
|
|
4723
|
+
} else if (isLastRow) {
|
|
4724
|
+
top = "0";
|
|
4725
|
+
height = "50%";
|
|
4726
|
+
}
|
|
4727
|
+
lines.push({
|
|
4728
|
+
type: "v",
|
|
4729
|
+
style: {
|
|
4730
|
+
left: `calc(${leftVal})`,
|
|
4731
|
+
top,
|
|
4732
|
+
height
|
|
4733
|
+
}
|
|
4734
|
+
});
|
|
4735
|
+
}
|
|
4736
|
+
} else {
|
|
4737
|
+
let vTop = "0";
|
|
4738
|
+
let vHeight = through ? "100%" : "50%";
|
|
4739
|
+
if (isFirstRow && isLastRow) {
|
|
4740
|
+
vTop = "50%";
|
|
4741
|
+
vHeight = "0px";
|
|
4742
|
+
} else if (isFirstRow) {
|
|
4743
|
+
vTop = "50%";
|
|
4744
|
+
vHeight = "50%";
|
|
4745
|
+
} else if (isLastRow) {
|
|
4746
|
+
vTop = "0";
|
|
4747
|
+
vHeight = "50%";
|
|
4748
|
+
}
|
|
4749
|
+
if (isExpandable && vHeight !== "0px") {
|
|
4750
|
+
let cutType = "v cut";
|
|
4751
|
+
if (vTop === "0" && vHeight === "50%") {
|
|
4752
|
+
cutType = "v cut-top";
|
|
4753
|
+
} else if (vTop === "50%" && vHeight === "50%") {
|
|
4754
|
+
cutType = "v cut-bottom";
|
|
4755
|
+
} else if (vHeight === "100%") {
|
|
4756
|
+
cutType = "v cut-full";
|
|
4757
|
+
}
|
|
4758
|
+
lines.push({
|
|
4759
|
+
type: cutType,
|
|
4760
|
+
style: {
|
|
4761
|
+
left: `calc(${leftVal})`,
|
|
4762
|
+
top: vTop,
|
|
4763
|
+
height: vHeight
|
|
4764
|
+
}
|
|
4765
|
+
});
|
|
4766
|
+
} else {
|
|
4767
|
+
if (vHeight !== "0px") {
|
|
4768
|
+
lines.push({
|
|
4769
|
+
type: "v",
|
|
4770
|
+
style: {
|
|
4771
|
+
left: `calc(${leftVal})`,
|
|
4772
|
+
top: vTop,
|
|
4773
|
+
height: vHeight
|
|
4774
|
+
}
|
|
4775
|
+
});
|
|
4776
|
+
}
|
|
4777
|
+
}
|
|
4778
|
+
if (isExpandable) {
|
|
4779
|
+
lines.push({
|
|
4780
|
+
type: "h",
|
|
4781
|
+
style: {
|
|
4782
|
+
left: `calc(${leftVal} + var(--vxe-ui-table-tree-node-btn-width) / 2 + 1px)`,
|
|
4783
|
+
top: "50%",
|
|
4784
|
+
width: "calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width) - 0.2em)"
|
|
4785
|
+
}
|
|
4786
|
+
});
|
|
4787
|
+
} else {
|
|
4788
|
+
lines.push({
|
|
4789
|
+
type: "h",
|
|
4790
|
+
style: {
|
|
4791
|
+
left: `calc(${leftVal})`,
|
|
4792
|
+
top: "50%",
|
|
4793
|
+
width: "calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width) / 2 - 0.1em)"
|
|
4794
|
+
}
|
|
4795
|
+
});
|
|
4796
|
+
}
|
|
4797
|
+
}
|
|
4798
|
+
}
|
|
4799
|
+
return lines;
|
|
4800
|
+
}
|
|
4801
|
+
|
|
4708
4802
|
// packages_temp/table/src/store.ts
|
|
4709
4803
|
var import_vue6 = require("vue");
|
|
4710
4804
|
var crossTableDragRowInfo = (0, import_vue6.reactive)({
|
|
@@ -4794,7 +4888,7 @@ var body_default = (
|
|
|
4794
4888
|
lineVNs.push(
|
|
4795
4889
|
(0, import_vue7.h)("span", {
|
|
4796
4890
|
key: "le" + i,
|
|
4797
|
-
class: ["vxe-tree
|
|
4891
|
+
class: ["vxe-table--tree-node-line", `type--${lineType || "solid"}`, item.type],
|
|
4798
4892
|
style: item.style
|
|
4799
4893
|
})
|
|
4800
4894
|
);
|
|
@@ -5342,7 +5436,7 @@ var body_default = (
|
|
|
5342
5436
|
cellStyle.height = `${expandHeight}px`;
|
|
5343
5437
|
}
|
|
5344
5438
|
if (treeConfig) {
|
|
5345
|
-
cellStyle.paddingLeft =
|
|
5439
|
+
cellStyle.paddingLeft = `calc(${rowLevel} * var(--vxe-ui-table-tree-node-indent) + 30px)`;
|
|
5346
5440
|
}
|
|
5347
5441
|
const { showOverflow } = expandColumn || {};
|
|
5348
5442
|
const colid = expandColumn.id;
|
|
@@ -12562,6 +12656,7 @@ hooks4.add("tableExportModule", {
|
|
|
12562
12656
|
const { isAllSelected, isIndeterminate } = reactData;
|
|
12563
12657
|
const { mergeBodyCellMaps, mergeFooterCellMaps } = internalData;
|
|
12564
12658
|
const treeOpts = computeTreeOpts.value;
|
|
12659
|
+
const treeIndent = treeOpts.indent || 20;
|
|
12565
12660
|
const { print: isPrint, widthMode, isHeader, isFooter, isColgroup, isMerge, colgroups, _columnConfs, original } = opts;
|
|
12566
12661
|
const isAutoWidth = widthMode === "auto";
|
|
12567
12662
|
const isScaleWidth = widthMode === "scale";
|
|
@@ -12704,11 +12799,11 @@ hooks4.add("tableExportModule", {
|
|
|
12704
12799
|
}
|
|
12705
12800
|
classNames.push("vxe-table--tree-node");
|
|
12706
12801
|
if (column.type === "radio") {
|
|
12707
|
-
return `<td class="${classNames.join(" ")}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level *
|
|
12802
|
+
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>`;
|
|
12708
12803
|
} else if (column.type === "checkbox") {
|
|
12709
|
-
return `<td class="${classNames.join(" ")}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level *
|
|
12804
|
+
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>`;
|
|
12710
12805
|
}
|
|
12711
|
-
return `<td class="${classNames.join(" ")}" title="${cellValue}"><div style="${getCellWidthStyle(column)}"><div class="vxe-table--tree-node-wrapper" style="padding-left: ${item._level *
|
|
12806
|
+
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>`;
|
|
12712
12807
|
}
|
|
12713
12808
|
if (column.type === "radio") {
|
|
12714
12809
|
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>`;
|
|
@@ -17558,11 +17653,14 @@ var table_default = (
|
|
|
17558
17653
|
return "";
|
|
17559
17654
|
});
|
|
17560
17655
|
const computeTableStyle = (0, import_vue22.computed)(() => {
|
|
17561
|
-
const { treeConfig } = props;
|
|
17562
17656
|
const barWidth = computeScrollYWidth.value;
|
|
17563
17657
|
const barHeight = computeScrollXHeight.value;
|
|
17564
17658
|
const treeOpts = computeTreeOpts.value;
|
|
17565
|
-
const { indent, lineWidth, lineColor } = treeOpts;
|
|
17659
|
+
const { indent: treeIndent, lineWidth, lineColor } = treeOpts;
|
|
17660
|
+
const expandOpts = computeExpandOpts.value;
|
|
17661
|
+
const { indent: edIndent } = expandOpts;
|
|
17662
|
+
const aggregateOpts = computeAggregateOpts.value;
|
|
17663
|
+
const { indent: rgIndent } = aggregateOpts;
|
|
17566
17664
|
const stys = {};
|
|
17567
17665
|
if (barWidth || barHeight) {
|
|
17568
17666
|
stys["--vxe-ui-table-view-scrollbar-width"] = toCssUnit(barWidth || barHeight);
|
|
@@ -17570,8 +17668,14 @@ var table_default = (
|
|
|
17570
17668
|
stys["--vxe-ui-table-view-scrollbar-height"] = toCssUnit(barHeight || barWidth);
|
|
17571
17669
|
stys["--vxe-ui-scrollbar-x-height"] = toCssUnit(barHeight || barWidth);
|
|
17572
17670
|
}
|
|
17573
|
-
if (
|
|
17574
|
-
stys["--vxe-ui-table-tree-node-indent"] = toCssUnit(
|
|
17671
|
+
if (edIndent) {
|
|
17672
|
+
stys["--vxe-ui-table-expand-tree-node-indent"] = toCssUnit(edIndent);
|
|
17673
|
+
}
|
|
17674
|
+
if (rgIndent) {
|
|
17675
|
+
stys["--vxe-ui-table-row-group-tree-node-indent"] = toCssUnit(rgIndent);
|
|
17676
|
+
}
|
|
17677
|
+
if (treeIndent) {
|
|
17678
|
+
stys["--vxe-ui-table-tree-node-indent"] = toCssUnit(treeIndent);
|
|
17575
17679
|
}
|
|
17576
17680
|
if (lineWidth) {
|
|
17577
17681
|
stys["--vxe-ui-table-tree-node-line-width"] = toCssUnit(lineWidth);
|
|
@@ -17824,6 +17928,7 @@ var table_default = (
|
|
|
17824
17928
|
computeExpandOpts,
|
|
17825
17929
|
computeTreeOpts,
|
|
17826
17930
|
computeShowTreeLine,
|
|
17931
|
+
computeShowTreeRootLine,
|
|
17827
17932
|
computeEmptyOpts,
|
|
17828
17933
|
computeLoadingOpts,
|
|
17829
17934
|
computeCellOffsetWidth,
|
|
@@ -19070,109 +19175,17 @@ var table_default = (
|
|
|
19070
19175
|
return cellValue;
|
|
19071
19176
|
};
|
|
19072
19177
|
};
|
|
19073
|
-
function getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow, showRootLine) {
|
|
19074
|
-
const lines = [];
|
|
19075
|
-
for (let col = 1; col <= depth; col++) {
|
|
19076
|
-
const leftVal = `var(--vxe-ui-table-tree-node-btn-width) + var(--vxe-ui-table-tree-node-indent) * ${col - 1}`;
|
|
19077
|
-
const through = (linesMask & 1 << col - 1) !== 0;
|
|
19078
|
-
if (col === 1 && !showRootLine) {
|
|
19079
|
-
continue;
|
|
19080
|
-
}
|
|
19081
|
-
if (col < depth) {
|
|
19082
|
-
if (through) {
|
|
19083
|
-
let top = "0";
|
|
19084
|
-
let height = "100%";
|
|
19085
|
-
if (isFirstRow) {
|
|
19086
|
-
top = "50%";
|
|
19087
|
-
height = "50%";
|
|
19088
|
-
} else if (isLastRow) {
|
|
19089
|
-
top = "0";
|
|
19090
|
-
height = "50%";
|
|
19091
|
-
}
|
|
19092
|
-
lines.push({
|
|
19093
|
-
type: "v",
|
|
19094
|
-
style: {
|
|
19095
|
-
left: `calc(${leftVal})`,
|
|
19096
|
-
top,
|
|
19097
|
-
height
|
|
19098
|
-
}
|
|
19099
|
-
});
|
|
19100
|
-
}
|
|
19101
|
-
} else {
|
|
19102
|
-
let vTop = "0";
|
|
19103
|
-
let vHeight = through ? "100%" : "50%";
|
|
19104
|
-
if (isFirstRow && isLastRow) {
|
|
19105
|
-
vTop = "50%";
|
|
19106
|
-
vHeight = "0px";
|
|
19107
|
-
} else if (isFirstRow) {
|
|
19108
|
-
vTop = "50%";
|
|
19109
|
-
vHeight = "50%";
|
|
19110
|
-
} else if (isLastRow) {
|
|
19111
|
-
vTop = "0";
|
|
19112
|
-
vHeight = "50%";
|
|
19113
|
-
}
|
|
19114
|
-
if (isExpandable && vHeight !== "0px") {
|
|
19115
|
-
let cutType = "v cut";
|
|
19116
|
-
if (vTop === "0" && vHeight === "50%") {
|
|
19117
|
-
cutType = "v cut-top";
|
|
19118
|
-
} else if (vTop === "50%" && vHeight === "50%") {
|
|
19119
|
-
cutType = "v cut-bottom";
|
|
19120
|
-
} else if (vHeight === "100%") {
|
|
19121
|
-
cutType = "v cut-full";
|
|
19122
|
-
}
|
|
19123
|
-
lines.push({
|
|
19124
|
-
type: cutType,
|
|
19125
|
-
style: {
|
|
19126
|
-
left: `calc(${leftVal})`,
|
|
19127
|
-
top: vTop,
|
|
19128
|
-
height: vHeight
|
|
19129
|
-
}
|
|
19130
|
-
});
|
|
19131
|
-
} else {
|
|
19132
|
-
if (vHeight !== "0px") {
|
|
19133
|
-
lines.push({
|
|
19134
|
-
type: "v",
|
|
19135
|
-
style: {
|
|
19136
|
-
left: `calc(${leftVal})`,
|
|
19137
|
-
top: vTop,
|
|
19138
|
-
height: vHeight
|
|
19139
|
-
}
|
|
19140
|
-
});
|
|
19141
|
-
}
|
|
19142
|
-
}
|
|
19143
|
-
if (isExpandable) {
|
|
19144
|
-
lines.push({
|
|
19145
|
-
type: "h",
|
|
19146
|
-
style: {
|
|
19147
|
-
left: `calc(${leftVal} + var(--vxe-ui-table-tree-node-btn-width) / 2 + 1px)`,
|
|
19148
|
-
top: "50%",
|
|
19149
|
-
width: "calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width) - 0.25em)"
|
|
19150
|
-
}
|
|
19151
|
-
});
|
|
19152
|
-
} else {
|
|
19153
|
-
lines.push({
|
|
19154
|
-
type: "h",
|
|
19155
|
-
style: {
|
|
19156
|
-
left: `calc(${leftVal})`,
|
|
19157
|
-
top: "50%",
|
|
19158
|
-
width: "calc(var(--vxe-ui-table-tree-node-indent) - var(--vxe-ui-table-tree-node-btn-width))"
|
|
19159
|
-
}
|
|
19160
|
-
});
|
|
19161
|
-
}
|
|
19162
|
-
}
|
|
19163
|
-
}
|
|
19164
|
-
return lines;
|
|
19165
|
-
}
|
|
19166
19178
|
const updateAfterTreeIndex = () => {
|
|
19167
19179
|
const { fullDataRowIdData, fullAllDataRowIdData, afterFullData, afterTreeFullData } = internalData;
|
|
19168
19180
|
const treeOpts = computeTreeOpts.value;
|
|
19169
|
-
const { lazy, transform,
|
|
19181
|
+
const { lazy, transform, mapChildrenField } = treeOpts;
|
|
19170
19182
|
const childrenField = treeOpts.children || treeOpts.childrenField;
|
|
19171
19183
|
const hasChildField = treeOpts.hasChild || treeOpts.hasChildField;
|
|
19172
19184
|
const showTreeLine = computeShowTreeLine.value;
|
|
19185
|
+
const showTreeRootLine = computeShowTreeRootLine.value;
|
|
19173
19186
|
const fullMaps = {};
|
|
19174
19187
|
const treeFullSize = afterTreeFullData.length;
|
|
19175
|
-
|
|
19188
|
+
let rowNum = 0;
|
|
19176
19189
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
19177
19190
|
function handleTreeDFS(row, index, items, parentRow, depth, isFirstRow, isLastRow, isLastChild, stackMask, seq) {
|
|
19178
19191
|
const rowid = handleGetRowId(row);
|
|
@@ -19180,22 +19193,19 @@ var table_default = (
|
|
|
19180
19193
|
const rowChilds = row[transform ? mapChildrenField : childrenField];
|
|
19181
19194
|
if (rowRest) {
|
|
19182
19195
|
rowRest.seq = seq;
|
|
19183
|
-
rowRest._seq = rowNum;
|
|
19184
19196
|
rowRest.items = items;
|
|
19185
19197
|
rowRest.treeIndex = index;
|
|
19186
|
-
rowRest._index = rowNum;
|
|
19187
|
-
rowRest._tIndex = rowNum;
|
|
19188
19198
|
} else {
|
|
19189
19199
|
rowRest = {
|
|
19190
19200
|
row,
|
|
19191
19201
|
rowid,
|
|
19192
|
-
_seq:
|
|
19193
|
-
seq,
|
|
19202
|
+
_seq: 0,
|
|
19203
|
+
seq: 0,
|
|
19194
19204
|
index,
|
|
19195
19205
|
$index: -1,
|
|
19196
|
-
_index:
|
|
19206
|
+
_index: 0,
|
|
19197
19207
|
treeIndex: index,
|
|
19198
|
-
_tIndex:
|
|
19208
|
+
_tIndex: 0,
|
|
19199
19209
|
items,
|
|
19200
19210
|
parent: parentRow,
|
|
19201
19211
|
level: 0,
|
|
@@ -19214,6 +19224,8 @@ var table_default = (
|
|
|
19214
19224
|
}
|
|
19215
19225
|
rowRest.seq = seq;
|
|
19216
19226
|
rowRest._seq = rowNum;
|
|
19227
|
+
rowRest._index = rowNum;
|
|
19228
|
+
rowRest._tIndex = rowNum;
|
|
19217
19229
|
rowRest.level = depth - 1;
|
|
19218
19230
|
rowRest.linesMask = linesMask;
|
|
19219
19231
|
const hasChild = rowChilds && rowChilds.length;
|
|
@@ -19225,14 +19237,17 @@ var table_default = (
|
|
|
19225
19237
|
isLazyLoaded = !!rest.treeLoaded;
|
|
19226
19238
|
}
|
|
19227
19239
|
const isExpandable = lazy ? isLazyLoaded ? hasChild : hasChild || hasLazyChilds : hasChild;
|
|
19228
|
-
rowRest.treeLines = showTreeLine && treeFullSize > 1 ? getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow,
|
|
19240
|
+
rowRest.treeLines = showTreeLine && treeFullSize > 1 ? getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow, showTreeRootLine) : [];
|
|
19229
19241
|
let nextStackMask = stackMask;
|
|
19230
19242
|
if (!isLastChild) {
|
|
19231
19243
|
nextStackMask |= 1 << depth;
|
|
19232
19244
|
}
|
|
19245
|
+
rowNum++;
|
|
19233
19246
|
fullMaps[rowid] = row;
|
|
19234
|
-
|
|
19235
|
-
|
|
19247
|
+
if (rowChilds) {
|
|
19248
|
+
for (let i = 0; i < rowChilds.length; i++) {
|
|
19249
|
+
handleTreeDFS(rowChilds[i], i, rowChilds, row, depth + 1, false, false, i === rowChilds.length - 1, nextStackMask, `${seq}.${i + 1}`);
|
|
19250
|
+
}
|
|
19236
19251
|
}
|
|
19237
19252
|
}
|
|
19238
19253
|
for (let i = 0; i < treeFullSize; i++) {
|
|
@@ -30355,7 +30370,7 @@ var table_default = (
|
|
|
30355
30370
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
30356
30371
|
tableRowExpandedList.forEach((row) => {
|
|
30357
30372
|
const expandOpts2 = computeExpandOpts.value;
|
|
30358
|
-
const { height: expandHeight, padding
|
|
30373
|
+
const { height: expandHeight, padding } = expandOpts2;
|
|
30359
30374
|
const { fullAllDataRowIdData, fullColumnIdData } = internalData;
|
|
30360
30375
|
const treeOpts = computeTreeOpts.value;
|
|
30361
30376
|
const { transform, seqMode } = treeOpts;
|
|
@@ -30385,7 +30400,7 @@ var table_default = (
|
|
|
30385
30400
|
cellStyle.height = `${expandHeight}px`;
|
|
30386
30401
|
}
|
|
30387
30402
|
if (isRowGroupStatus || treeConfig) {
|
|
30388
|
-
cellStyle.paddingLeft =
|
|
30403
|
+
cellStyle.paddingLeft = `calc(${rowLevel} * var(--vxe-ui-table-expand-tree-node-indent) + 30px)`;
|
|
30389
30404
|
}
|
|
30390
30405
|
let columnIndex = -1;
|
|
30391
30406
|
let $columnIndex = -1;
|