vxe-pc-ui 4.21.0 → 4.21.2
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 +442 -94
- package/dist/all.esm.min.js +3 -3
- package/dist/style.css +149 -29
- package/dist/style.mini.css +1 -1
- package/es/esm.index.d.ts +7 -0
- package/es/esm.index.js +8 -0
- package/es/icon/style.css +43 -4
- package/es/icon/style.mini.css +1 -1
- package/es/style.css +149 -29
- package/es/style.mini.css +1 -1
- package/es/tree/index.d.ts +14 -6
- package/es/tree/src/tree.d.ts +3 -1
- package/es/tree/src/tree.js +111 -48
- package/es/tree/src/util.d.ts +5 -0
- package/es/tree/src/util.js +97 -2
- package/es/tree/style.css +99 -23
- package/es/tree/style.mini.css +1 -1
- package/es/ui/index.js +15 -12
- package/es/ui/src/log.js +1 -1
- package/es/vxe-icon/style.css +43 -4
- package/es/vxe-icon/style.mini.css +1 -1
- package/es/vxe-tree/style.css +99 -23
- package/es/vxe-tree/style.mini.css +1 -1
- package/lib/esm.index.d.ts +7 -0
- package/lib/esm.index.js +39 -0
- package/lib/icon/style/style.css +43 -4
- package/lib/icon/style/style.mini.css +1 -1
- package/lib/index.umd.js +221 -93
- package/lib/index.umd.min.js +3 -3
- package/lib/style.css +149 -29
- package/lib/style.mini.css +1 -1
- package/lib/tree/index.d.ts +14 -6
- package/lib/tree/src/tree.d.ts +3 -1
- package/lib/tree/src/tree.js +110 -47
- package/lib/tree/src/util.d.ts +5 -0
- package/lib/tree/src/util.js +97 -2
- package/lib/tree/style/style.css +99 -23
- package/lib/tree/style/style.mini.css +1 -1
- package/lib/ui/index.js +15 -12
- package/lib/ui/src/log.js +1 -1
- package/lib/vxe-icon/style/style.css +43 -4
- package/lib/vxe-icon/style/style.mini.css +1 -1
- package/lib/vxe-tree/style/style.css +99 -23
- package/lib/vxe-tree/style/style.mini.css +1 -1
- package/package.json +2 -2
- package/packages/esm.index.ts +10 -0
- package/packages/tree/src/tree.ts +129 -48
- package/packages/tree/src/util.ts +113 -1
- package/packages/ui/index.ts +14 -11
- package/styles/components/icon.scss +11 -3
- package/styles/components/tree.scss +145 -14
- package/styles/theme/base.scss +7 -2
- package/types/components/table.d.ts +1 -0
- package/types/components/tree.d.ts +34 -0
- /package/dist/{iconfont.1794558186564.ttf → iconfont.1794797289947.ttf} +0 -0
- /package/dist/{iconfont.1794558186564.woff → iconfont.1794797289947.woff} +0 -0
- /package/dist/{iconfont.1794558186564.woff2 → iconfont.1794797289947.woff2} +0 -0
- /package/es/icon/{iconfont.1794558186564.ttf → iconfont.1794797289947.ttf} +0 -0
- /package/es/icon/{iconfont.1794558186564.woff → iconfont.1794797289947.woff} +0 -0
- /package/es/icon/{iconfont.1794558186564.woff2 → iconfont.1794797289947.woff2} +0 -0
- /package/es/{iconfont.1794558186564.ttf → iconfont.1794797289947.ttf} +0 -0
- /package/es/{iconfont.1794558186564.woff → iconfont.1794797289947.woff} +0 -0
- /package/es/{iconfont.1794558186564.woff2 → iconfont.1794797289947.woff2} +0 -0
- /package/es/vxe-icon/{iconfont.1794558186564.ttf → iconfont.1794797289947.ttf} +0 -0
- /package/es/vxe-icon/{iconfont.1794558186564.woff → iconfont.1794797289947.woff} +0 -0
- /package/es/vxe-icon/{iconfont.1794558186564.woff2 → iconfont.1794797289947.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1794558186564.ttf → iconfont.1794797289947.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1794558186564.woff → iconfont.1794797289947.woff} +0 -0
- /package/lib/icon/style/{iconfont.1794558186564.woff2 → iconfont.1794797289947.woff2} +0 -0
- /package/lib/{iconfont.1794558186564.ttf → iconfont.1794797289947.ttf} +0 -0
- /package/lib/{iconfont.1794558186564.woff → iconfont.1794797289947.woff} +0 -0
- /package/lib/{iconfont.1794558186564.woff2 → iconfont.1794797289947.woff2} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1794558186564.ttf → iconfont.1794797289947.ttf} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1794558186564.woff → iconfont.1794797289947.woff} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1794558186564.woff2 → iconfont.1794797289947.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -2539,7 +2539,7 @@ function checkDynamic() {
|
|
|
2539
2539
|
|
|
2540
2540
|
// packages_temp/ui/src/log.ts
|
|
2541
2541
|
var { log: log2 } = VxeUI;
|
|
2542
|
-
var uiVersion = `ui v${"4.21.
|
|
2542
|
+
var uiVersion = `ui v${"4.21.2"}`;
|
|
2543
2543
|
function createComponentLog(name) {
|
|
2544
2544
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : "";
|
|
2545
2545
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : "";
|
|
@@ -2566,7 +2566,7 @@ VxeUI.config = config;
|
|
|
2566
2566
|
VxeUI.setup = setup;
|
|
2567
2567
|
|
|
2568
2568
|
// packages_temp/ui/index.ts
|
|
2569
|
-
var version2 = "4.21.
|
|
2569
|
+
var version2 = "4.21.2";
|
|
2570
2570
|
VxeUI.uiVersion = version2;
|
|
2571
2571
|
VxeUI.dynamicApp = dynamicApp;
|
|
2572
2572
|
setConfig({
|
|
@@ -3059,9 +3059,12 @@ setConfig({
|
|
|
3059
3059
|
transfer: {},
|
|
3060
3060
|
tree: {
|
|
3061
3061
|
// autoResize: false,
|
|
3062
|
-
indent: 20,
|
|
3062
|
+
// indent: 20,
|
|
3063
3063
|
minHeight: 60,
|
|
3064
3064
|
showOverflow: true,
|
|
3065
|
+
lineConfig: {
|
|
3066
|
+
showRootLine: true
|
|
3067
|
+
},
|
|
3065
3068
|
radioConfig: {
|
|
3066
3069
|
strict: true
|
|
3067
3070
|
},
|
|
@@ -3136,20 +3139,20 @@ setIcon({
|
|
|
3136
3139
|
// loading
|
|
3137
3140
|
LOADING: iconPrefix + "spinner roll vxe-loading--default-icon",
|
|
3138
3141
|
// button
|
|
3139
|
-
BUTTON_DROPDOWN_OPEN: iconPrefix + "arrow-down
|
|
3142
|
+
BUTTON_DROPDOWN_OPEN: iconPrefix + "arrow-down rotate-180",
|
|
3140
3143
|
BUTTON_DROPDOWN_CLOSE: iconPrefix + "arrow-down",
|
|
3141
3144
|
BUTTON_LOADING: iconPrefix + "spinner roll",
|
|
3142
3145
|
BUTTON_TOOLTIP_ICON: iconPrefix + "question-circle-fill",
|
|
3143
3146
|
// menu
|
|
3144
|
-
MENU_ITEM_EXPAND_OPEN: iconPrefix + "arrow-right
|
|
3147
|
+
MENU_ITEM_EXPAND_OPEN: iconPrefix + "arrow-right rotate-90",
|
|
3145
3148
|
MENU_ITEM_EXPAND_CLOSE: iconPrefix + "arrow-right",
|
|
3146
3149
|
// select
|
|
3147
3150
|
SELECT_LOADED: iconPrefix + "spinner roll",
|
|
3148
|
-
SELECT_OPEN: iconPrefix + "caret-down
|
|
3151
|
+
SELECT_OPEN: iconPrefix + "caret-down rotate-180",
|
|
3149
3152
|
SELECT_CLOSE: iconPrefix + "caret-down",
|
|
3150
3153
|
SELECT_ADD_OPTION: iconPrefix + "add",
|
|
3151
3154
|
// icon-picker
|
|
3152
|
-
ICON_PICKER_OPEN: iconPrefix + "caret-down
|
|
3155
|
+
ICON_PICKER_OPEN: iconPrefix + "caret-down rotate-180",
|
|
3153
3156
|
ICON_PICKER_CLOSE: iconPrefix + "caret-down",
|
|
3154
3157
|
// pager
|
|
3155
3158
|
PAGER_HOME: iconPrefix + "home-page",
|
|
@@ -3200,7 +3203,7 @@ setIcon({
|
|
|
3200
3203
|
// form
|
|
3201
3204
|
FORM_PREFIX: iconPrefix + "question-circle-fill",
|
|
3202
3205
|
FORM_SUFFIX: iconPrefix + "question-circle-fill",
|
|
3203
|
-
FORM_FOLDING: iconPrefix + "arrow-up
|
|
3206
|
+
FORM_FOLDING: iconPrefix + "arrow-up rotate-180",
|
|
3204
3207
|
FORM_UNFOLDING: iconPrefix + "arrow-up",
|
|
3205
3208
|
FORM_VALID_ERROR_ICON: iconPrefix + "warning-circle-fill",
|
|
3206
3209
|
// form-design
|
|
@@ -3264,7 +3267,7 @@ setIcon({
|
|
|
3264
3267
|
ALERT_WARNING: iconPrefix + "warning-circle-fill",
|
|
3265
3268
|
ALERT_ERROR: iconPrefix + "error-circle-fill",
|
|
3266
3269
|
// tree
|
|
3267
|
-
TREE_NODE_OPEN: iconPrefix + "caret-right
|
|
3270
|
+
TREE_NODE_OPEN: iconPrefix + "caret-right rotate-90",
|
|
3268
3271
|
TREE_NODE_CLOSE: iconPrefix + "caret-right",
|
|
3269
3272
|
TREE_NODE_LOADED: iconPrefix + "spinner roll",
|
|
3270
3273
|
TREE_DRAG: iconPrefix + "drag-handle",
|
|
@@ -3273,11 +3276,11 @@ setIcon({
|
|
|
3273
3276
|
TREE_DRAG_DISABLED: iconPrefix + "no-drop",
|
|
3274
3277
|
// tree-select
|
|
3275
3278
|
TREE_SELECT_LOADED: iconPrefix + "spinner roll",
|
|
3276
|
-
TREE_SELECT_OPEN: iconPrefix + "caret-down
|
|
3279
|
+
TREE_SELECT_OPEN: iconPrefix + "caret-down rotate-180",
|
|
3277
3280
|
TREE_SELECT_CLOSE: iconPrefix + "caret-down",
|
|
3278
3281
|
// table-select
|
|
3279
3282
|
TABLE_SELECT_LOADED: iconPrefix + "spinner roll",
|
|
3280
|
-
TABLE_SELECT_OPEN: iconPrefix + "caret-down
|
|
3283
|
+
TABLE_SELECT_OPEN: iconPrefix + "caret-down rotate-180",
|
|
3281
3284
|
TABLE_SELECT_CLOSE: iconPrefix + "caret-down",
|
|
3282
3285
|
// tabs
|
|
3283
3286
|
TABS_TAB_BUTTON_TOP: iconPrefix + "arrow-up",
|
|
@@ -3299,7 +3302,7 @@ setIcon({
|
|
|
3299
3302
|
CAROUSEL_VERTICAL_PREVIOUS: iconPrefix + "arrow-up",
|
|
3300
3303
|
CAROUSEL_VERTICAL_NEXT: iconPrefix + "arrow-down",
|
|
3301
3304
|
// collapse
|
|
3302
|
-
COLLAPSE_OPEN: iconPrefix + "arrow-right
|
|
3305
|
+
COLLAPSE_OPEN: iconPrefix + "arrow-right rotate-90",
|
|
3303
3306
|
COLLAPSE_CLOSE: iconPrefix + "arrow-right",
|
|
3304
3307
|
// empty
|
|
3305
3308
|
EMPTY_DEFAULT: iconPrefix + "empty",
|
|
@@ -3316,7 +3319,7 @@ setIcon({
|
|
|
3316
3319
|
// color-picker
|
|
3317
3320
|
COLOR_PICKER_COLOR_COPY: iconPrefix + "copy",
|
|
3318
3321
|
COLOR_PICKER_EYE_DROPPER: iconPrefix + "dropper",
|
|
3319
|
-
COLOR_PICKER_TPTY_OPEN: iconPrefix + "arrow-down
|
|
3322
|
+
COLOR_PICKER_TPTY_OPEN: iconPrefix + "arrow-down rotate-180",
|
|
3320
3323
|
COLOR_PICKER_TPTY_CLOSE: iconPrefix + "arrow-down",
|
|
3321
3324
|
// split
|
|
3322
3325
|
SPLIT_TOP_ACTION: iconPrefix + "arrow-up",
|
|
@@ -51014,38 +51017,6 @@ var transfer_default2 = VxeTransfer;
|
|
|
51014
51017
|
var import_vue105 = require("vue");
|
|
51015
51018
|
|
|
51016
51019
|
// packages_temp/tree/src/util.ts
|
|
51017
|
-
function countTreeExpand($xeTree, prevNode) {
|
|
51018
|
-
let count = 1;
|
|
51019
|
-
if (!prevNode) {
|
|
51020
|
-
return count;
|
|
51021
|
-
}
|
|
51022
|
-
const props = $xeTree.props;
|
|
51023
|
-
const { transform } = props;
|
|
51024
|
-
const reactData = $xeTree.reactData;
|
|
51025
|
-
const { updateExpandedFlag } = reactData;
|
|
51026
|
-
const internalData = $xeTree.internalData;
|
|
51027
|
-
const { treeExpandedMaps } = internalData;
|
|
51028
|
-
const { computeChildrenField, computeMapChildrenField } = $xeTree.getComputeMaps();
|
|
51029
|
-
const childrenField = computeChildrenField.value;
|
|
51030
|
-
const mapChildrenField = computeMapChildrenField.value;
|
|
51031
|
-
const nodeChildren = prevNode[transform ? mapChildrenField : childrenField];
|
|
51032
|
-
if (nodeChildren && updateExpandedFlag && treeExpandedMaps[$xeTree.getNodeId(prevNode)]) {
|
|
51033
|
-
for (let index = 0; index < nodeChildren.length; index++) {
|
|
51034
|
-
count += countTreeExpand($xeTree, nodeChildren[index]);
|
|
51035
|
-
}
|
|
51036
|
-
}
|
|
51037
|
-
return count;
|
|
51038
|
-
}
|
|
51039
|
-
function calcTreeLine($xeTree, node, prevNode) {
|
|
51040
|
-
const internalData = $xeTree.internalData;
|
|
51041
|
-
const { scrollYStore } = internalData;
|
|
51042
|
-
const { rowHeight } = scrollYStore;
|
|
51043
|
-
let expandSize = 1;
|
|
51044
|
-
if (prevNode) {
|
|
51045
|
-
expandSize = countTreeExpand($xeTree, prevNode);
|
|
51046
|
-
}
|
|
51047
|
-
return (rowHeight || 28) * expandSize - (prevNode ? 1 : 12);
|
|
51048
|
-
}
|
|
51049
51020
|
function getItemCacheObj2(item) {
|
|
51050
51021
|
return {
|
|
51051
51022
|
item,
|
|
@@ -51058,9 +51029,103 @@ function getItemCacheObj2(item) {
|
|
|
51058
51029
|
level: 0,
|
|
51059
51030
|
treeIndex: -1,
|
|
51060
51031
|
lineCount: 0,
|
|
51061
|
-
treeLoaded: false
|
|
51032
|
+
treeLoaded: false,
|
|
51033
|
+
linesMask: 0
|
|
51062
51034
|
};
|
|
51063
51035
|
}
|
|
51036
|
+
function getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow, showRootLine) {
|
|
51037
|
+
const lines = [];
|
|
51038
|
+
for (let col = 1; col <= depth; col++) {
|
|
51039
|
+
const leftVal = `var(--vxe-ui-tree-node-padding) + var(--vxe-ui-tree-node-btn-width) / 2 + var(--vxe-ui-tree-node-indent) * ${col - 1}`;
|
|
51040
|
+
const through = (linesMask & 1 << col - 1) !== 0;
|
|
51041
|
+
if (col === 1 && !showRootLine) {
|
|
51042
|
+
continue;
|
|
51043
|
+
}
|
|
51044
|
+
if (col < depth) {
|
|
51045
|
+
if (through) {
|
|
51046
|
+
let top = "0";
|
|
51047
|
+
let height = "100%";
|
|
51048
|
+
if (isFirstRow) {
|
|
51049
|
+
top = "50%";
|
|
51050
|
+
height = "50%";
|
|
51051
|
+
} else if (isLastRow) {
|
|
51052
|
+
top = "0";
|
|
51053
|
+
height = "50%";
|
|
51054
|
+
}
|
|
51055
|
+
lines.push({
|
|
51056
|
+
type: "v",
|
|
51057
|
+
style: {
|
|
51058
|
+
left: `calc(${leftVal})`,
|
|
51059
|
+
top,
|
|
51060
|
+
height
|
|
51061
|
+
}
|
|
51062
|
+
});
|
|
51063
|
+
}
|
|
51064
|
+
} else {
|
|
51065
|
+
let vTop = "0";
|
|
51066
|
+
let vHeight = through ? "100%" : "50%";
|
|
51067
|
+
if (isFirstRow && isLastRow) {
|
|
51068
|
+
vTop = "50%";
|
|
51069
|
+
vHeight = "0px";
|
|
51070
|
+
} else if (isFirstRow) {
|
|
51071
|
+
vTop = "50%";
|
|
51072
|
+
vHeight = "50%";
|
|
51073
|
+
} else if (isLastRow) {
|
|
51074
|
+
vTop = "0";
|
|
51075
|
+
vHeight = "50%";
|
|
51076
|
+
}
|
|
51077
|
+
if (isExpandable && vHeight !== "0px") {
|
|
51078
|
+
let cutType = "v cut";
|
|
51079
|
+
if (vTop === "0" && vHeight === "50%") {
|
|
51080
|
+
cutType = "v cut-top";
|
|
51081
|
+
} else if (vTop === "50%" && vHeight === "50%") {
|
|
51082
|
+
cutType = "v cut-bottom";
|
|
51083
|
+
} else if (vHeight === "100%") {
|
|
51084
|
+
cutType = "v cut-full";
|
|
51085
|
+
}
|
|
51086
|
+
lines.push({
|
|
51087
|
+
type: cutType,
|
|
51088
|
+
style: {
|
|
51089
|
+
left: `calc(${leftVal})`,
|
|
51090
|
+
top: vTop,
|
|
51091
|
+
height: vHeight
|
|
51092
|
+
}
|
|
51093
|
+
});
|
|
51094
|
+
} else {
|
|
51095
|
+
if (vHeight !== "0px") {
|
|
51096
|
+
lines.push({
|
|
51097
|
+
type: "v",
|
|
51098
|
+
style: {
|
|
51099
|
+
left: `calc(${leftVal})`,
|
|
51100
|
+
top: vTop,
|
|
51101
|
+
height: vHeight
|
|
51102
|
+
}
|
|
51103
|
+
});
|
|
51104
|
+
}
|
|
51105
|
+
}
|
|
51106
|
+
if (isExpandable) {
|
|
51107
|
+
lines.push({
|
|
51108
|
+
type: "h",
|
|
51109
|
+
style: {
|
|
51110
|
+
left: `calc(${leftVal} + var(--vxe-ui-tree-node-btn-width) / 2)`,
|
|
51111
|
+
top: "50%",
|
|
51112
|
+
width: "calc(var(--vxe-ui-tree-node-indent) - var(--vxe-ui-tree-node-btn-width) - 0.2em)"
|
|
51113
|
+
}
|
|
51114
|
+
});
|
|
51115
|
+
} else {
|
|
51116
|
+
lines.push({
|
|
51117
|
+
type: "h",
|
|
51118
|
+
style: {
|
|
51119
|
+
left: `calc(${leftVal})`,
|
|
51120
|
+
top: "50%",
|
|
51121
|
+
width: "calc(var(--vxe-ui-tree-node-indent) - var(--vxe-ui-tree-node-btn-width) / 2 - 0.1em)"
|
|
51122
|
+
}
|
|
51123
|
+
});
|
|
51124
|
+
}
|
|
51125
|
+
}
|
|
51126
|
+
}
|
|
51127
|
+
return lines;
|
|
51128
|
+
}
|
|
51064
51129
|
|
|
51065
51130
|
// packages_temp/tree/src/store.ts
|
|
51066
51131
|
var import_vue104 = require("vue");
|
|
@@ -51219,6 +51284,7 @@ var tree_default = (
|
|
|
51219
51284
|
type: Boolean,
|
|
51220
51285
|
default: () => getConfig73().tree.showLine
|
|
51221
51286
|
},
|
|
51287
|
+
lineConfig: Object,
|
|
51222
51288
|
trigger: String,
|
|
51223
51289
|
indent: {
|
|
51224
51290
|
type: Number,
|
|
@@ -51372,6 +51438,13 @@ var tree_default = (
|
|
|
51372
51438
|
}
|
|
51373
51439
|
return props.isHover;
|
|
51374
51440
|
});
|
|
51441
|
+
const computeLineOpts = (0, import_vue105.computed)(() => {
|
|
51442
|
+
return Object.assign({}, getConfig73().tree.lineConfig, props.lineConfig);
|
|
51443
|
+
});
|
|
51444
|
+
const computeShowTreeRootLine = (0, import_vue105.computed)(() => {
|
|
51445
|
+
const lineOpts = computeLineOpts.value;
|
|
51446
|
+
return lineOpts.showRootLine;
|
|
51447
|
+
});
|
|
51375
51448
|
const computeRadioOpts = (0, import_vue105.computed)(() => {
|
|
51376
51449
|
return Object.assign({ showIcon: true }, getConfig73().tree.radioConfig, props.radioConfig);
|
|
51377
51450
|
});
|
|
@@ -51413,6 +51486,8 @@ var tree_default = (
|
|
|
51413
51486
|
const computeTreeStyle = (0, import_vue105.computed)(() => {
|
|
51414
51487
|
const { indent } = props;
|
|
51415
51488
|
const { customHeight, customMinHeight, customMaxHeight } = reactData;
|
|
51489
|
+
const lineOpts = computeLineOpts.value;
|
|
51490
|
+
const { lineWidth, lineColor } = lineOpts;
|
|
51416
51491
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
51417
51492
|
const { nodeStyle } = checkboxOpts;
|
|
51418
51493
|
const stys = {};
|
|
@@ -51428,6 +51503,12 @@ var tree_default = (
|
|
|
51428
51503
|
if (indent) {
|
|
51429
51504
|
stys["--vxe-ui-tree-node-indent"] = toCssUnit(indent);
|
|
51430
51505
|
}
|
|
51506
|
+
if (lineWidth) {
|
|
51507
|
+
stys["--vxe-ui-tree-node-line-width"] = toCssUnit(lineWidth);
|
|
51508
|
+
}
|
|
51509
|
+
if (lineColor) {
|
|
51510
|
+
stys["--vxe-ui-tree-node-line-color"] = toCssUnit(lineColor);
|
|
51511
|
+
}
|
|
51431
51512
|
if (nodeStyle) {
|
|
51432
51513
|
const { indeterminateColor, checkedColor } = nodeStyle;
|
|
51433
51514
|
if (indeterminateColor) {
|
|
@@ -51709,7 +51790,8 @@ var tree_default = (
|
|
|
51709
51790
|
level: nodes.length - 1,
|
|
51710
51791
|
treeIndex: index,
|
|
51711
51792
|
lineCount: 0,
|
|
51712
|
-
treeLoaded: false
|
|
51793
|
+
treeLoaded: false,
|
|
51794
|
+
linesMask: 0
|
|
51713
51795
|
};
|
|
51714
51796
|
},
|
|
51715
51797
|
{ children: childrenField }
|
|
@@ -51717,40 +51799,69 @@ var tree_default = (
|
|
|
51717
51799
|
internalData.nodeMaps = keyMaps;
|
|
51718
51800
|
};
|
|
51719
51801
|
const updateAfterDataIndex = () => {
|
|
51720
|
-
const { transform } = props;
|
|
51802
|
+
const { lazy, showLine, transform } = props;
|
|
51721
51803
|
const { afterTreeList, nodeMaps } = internalData;
|
|
51722
51804
|
const childrenField = computeChildrenField.value;
|
|
51723
51805
|
const mapChildrenField = computeMapChildrenField.value;
|
|
51806
|
+
const hasChildField = computeHasChildField.value;
|
|
51807
|
+
const showTreeRootLine = computeShowTreeRootLine.value;
|
|
51808
|
+
const treeFullSize = afterTreeList.length;
|
|
51724
51809
|
let vtIndex = 0;
|
|
51725
|
-
|
|
51726
|
-
|
|
51727
|
-
|
|
51728
|
-
|
|
51729
|
-
|
|
51730
|
-
|
|
51731
|
-
|
|
51732
|
-
|
|
51733
|
-
|
|
51734
|
-
|
|
51735
|
-
|
|
51736
|
-
|
|
51737
|
-
|
|
51738
|
-
|
|
51739
|
-
|
|
51740
|
-
|
|
51741
|
-
|
|
51742
|
-
|
|
51743
|
-
|
|
51744
|
-
|
|
51745
|
-
|
|
51746
|
-
|
|
51747
|
-
|
|
51748
|
-
|
|
51810
|
+
function handleTreeDFS(item, index, items, parenItem, depth, isFirstRow, isLastRow, isLastChild, stackMask, seq) {
|
|
51811
|
+
const nodeid = getNodeId(item);
|
|
51812
|
+
let nodeItem = nodeMaps[nodeid];
|
|
51813
|
+
const nodeChilds = item[transform ? mapChildrenField : childrenField];
|
|
51814
|
+
const childList = import_xe_utils133.default.get(item, childrenField);
|
|
51815
|
+
const isExistChild = childList && childList.length > 0;
|
|
51816
|
+
if (nodeItem) {
|
|
51817
|
+
nodeItem.items = items;
|
|
51818
|
+
nodeItem.treeIndex = index;
|
|
51819
|
+
nodeItem._index = vtIndex;
|
|
51820
|
+
} else {
|
|
51821
|
+
nodeItem = {
|
|
51822
|
+
item,
|
|
51823
|
+
index,
|
|
51824
|
+
$index: -1,
|
|
51825
|
+
_index: vtIndex,
|
|
51826
|
+
items,
|
|
51827
|
+
parent: parenItem,
|
|
51828
|
+
nodes: [],
|
|
51829
|
+
level: 0,
|
|
51830
|
+
treeIndex: index,
|
|
51831
|
+
lineCount: 0,
|
|
51832
|
+
treeLoaded: false,
|
|
51833
|
+
linesMask: 0
|
|
51834
|
+
};
|
|
51835
|
+
nodeMaps[nodeid] = nodeItem;
|
|
51836
|
+
}
|
|
51837
|
+
let linesMask = stackMask >> 1;
|
|
51838
|
+
if (!isLastChild) {
|
|
51839
|
+
linesMask |= 1 << depth - 1;
|
|
51840
|
+
}
|
|
51841
|
+
nodeItem.level = depth - 1;
|
|
51842
|
+
nodeItem.linesMask = linesMask;
|
|
51843
|
+
let hasLazyChilds = false;
|
|
51844
|
+
let isLazyLoaded = false;
|
|
51845
|
+
if (lazy) {
|
|
51846
|
+
hasLazyChilds = item[hasChildField];
|
|
51847
|
+
isLazyLoaded = !!nodeItem.treeLoaded;
|
|
51848
|
+
}
|
|
51849
|
+
const isExpandable = lazy ? isLazyLoaded ? isExistChild : hasLazyChilds : isExistChild;
|
|
51850
|
+
nodeItem.treeLines = showLine && treeFullSize > 1 ? getTreeNodeLines(isExpandable, depth, linesMask, isFirstRow, isLastRow, showTreeRootLine) : [];
|
|
51851
|
+
let nextStackMask = stackMask;
|
|
51852
|
+
if (!isLastChild) {
|
|
51853
|
+
nextStackMask |= 1 << depth;
|
|
51854
|
+
}
|
|
51855
|
+
vtIndex++;
|
|
51856
|
+
if (nodeChilds) {
|
|
51857
|
+
for (let i = 0; i < nodeChilds.length; i++) {
|
|
51858
|
+
handleTreeDFS(nodeChilds[i], i, nodeChilds, item, depth + 1, false, false, i === nodeChilds.length - 1, nextStackMask, `${seq}.${i + 1}`);
|
|
51749
51859
|
}
|
|
51750
|
-
|
|
51751
|
-
|
|
51752
|
-
|
|
51753
|
-
|
|
51860
|
+
}
|
|
51861
|
+
}
|
|
51862
|
+
for (let i = 0; i < treeFullSize; i++) {
|
|
51863
|
+
handleTreeDFS(afterTreeList[i], i, afterTreeList, null, 1, !i, i === treeFullSize - 1, i === treeFullSize - 1, 0, "" + i);
|
|
51864
|
+
}
|
|
51754
51865
|
};
|
|
51755
51866
|
const updateAfterFullData = () => {
|
|
51756
51867
|
const { transform, filterValue } = props;
|
|
@@ -53140,7 +53251,8 @@ var tree_default = (
|
|
|
53140
53251
|
level: parentLevel + nodes.length,
|
|
53141
53252
|
treeIndex: -1,
|
|
53142
53253
|
lineCount: 0,
|
|
53143
|
-
treeLoaded: false
|
|
53254
|
+
treeLoaded: false,
|
|
53255
|
+
linesMask: 0
|
|
53144
53256
|
};
|
|
53145
53257
|
},
|
|
53146
53258
|
{ children: childrenField }
|
|
@@ -54174,10 +54286,28 @@ var tree_default = (
|
|
|
54174
54286
|
}
|
|
54175
54287
|
return renderEmptyElement59($xeTree);
|
|
54176
54288
|
};
|
|
54289
|
+
const renderLine = (nodeItem) => {
|
|
54290
|
+
const treeLines = nodeItem.treeLines;
|
|
54291
|
+
const lineVNs = [];
|
|
54292
|
+
if (treeLines) {
|
|
54293
|
+
const lineOpts = computeLineOpts.value;
|
|
54294
|
+
const { lineType } = lineOpts;
|
|
54295
|
+
treeLines.forEach((item, i) => {
|
|
54296
|
+
lineVNs.push(
|
|
54297
|
+
(0, import_vue105.h)("span", {
|
|
54298
|
+
key: "le" + i,
|
|
54299
|
+
class: ["vxe-tree--node-line", `type--${lineType || "solid"}`, item.type],
|
|
54300
|
+
style: item.style
|
|
54301
|
+
})
|
|
54302
|
+
);
|
|
54303
|
+
});
|
|
54304
|
+
}
|
|
54305
|
+
return lineVNs;
|
|
54306
|
+
};
|
|
54177
54307
|
const renderNode = (node, nodeid) => {
|
|
54178
54308
|
const { lazy, drag, transform, showRadio, showCheckbox, showLine, visibleMethod, iconOpen, iconClose, iconLoaded, showIcon } = props;
|
|
54179
54309
|
const { currentNode, selectRadioKey, updateExpandedFlag } = reactData;
|
|
54180
|
-
const {
|
|
54310
|
+
const { nodeMaps, treeExpandedMaps, treeExpandLazyLoadedMaps } = internalData;
|
|
54181
54311
|
const tooltipOpts = computeTooltipOpts.value;
|
|
54182
54312
|
const { mode: tipMode } = tooltipOpts;
|
|
54183
54313
|
const radioOpts = computeRadioOpts.value;
|
|
@@ -54216,7 +54346,6 @@ var tree_default = (
|
|
|
54216
54346
|
hasLazyChilds = node[hasChildField];
|
|
54217
54347
|
isLazyLoaded = !!nodeItem.treeLoaded;
|
|
54218
54348
|
}
|
|
54219
|
-
const prevNode = nodeItem.items[nodeItem.treeIndex - 1];
|
|
54220
54349
|
const nParams = { node, isExpand, $tree: $xeTree };
|
|
54221
54350
|
const itemOns = {
|
|
54222
54351
|
onMousedown(evnt) {
|
|
@@ -54270,20 +54399,9 @@ var tree_default = (
|
|
|
54270
54399
|
]
|
|
54271
54400
|
},
|
|
54272
54401
|
[
|
|
54273
|
-
showLine ? (0, import_vue105.h)(
|
|
54274
|
-
"
|
|
54275
|
-
|
|
54276
|
-
class: "vxe-tree--node-line-wrapper"
|
|
54277
|
-
},
|
|
54278
|
-
[
|
|
54279
|
-
(0, import_vue105.h)("div", {
|
|
54280
|
-
class: "vxe-tree--node-line",
|
|
54281
|
-
style: {
|
|
54282
|
-
height: `${getNodeId(afterTreeList[0]) === nodeid ? 1 : calcTreeLine($xeTree, node, prevNode)}px`
|
|
54283
|
-
}
|
|
54284
|
-
})
|
|
54285
|
-
]
|
|
54286
|
-
) : renderEmptyElement59($xeTree),
|
|
54402
|
+
showLine ? (0, import_vue105.h)("div", {
|
|
54403
|
+
class: "vxe-tree--node-line-wrapper"
|
|
54404
|
+
}, renderLine(nodeItem)) : renderEmptyElement59($xeTree),
|
|
54287
54405
|
(0, import_vue105.h)(
|
|
54288
54406
|
"div",
|
|
54289
54407
|
{
|
|
@@ -54755,6 +54873,16 @@ var tree_default = (
|
|
|
54755
54873
|
recalculate();
|
|
54756
54874
|
});
|
|
54757
54875
|
});
|
|
54876
|
+
const lineFlag = (0, import_vue105.ref)(0);
|
|
54877
|
+
(0, import_vue105.watch)(() => props.showLine, () => {
|
|
54878
|
+
lineFlag.value++;
|
|
54879
|
+
});
|
|
54880
|
+
(0, import_vue105.watch)(computeShowTreeRootLine, () => {
|
|
54881
|
+
lineFlag.value++;
|
|
54882
|
+
});
|
|
54883
|
+
(0, import_vue105.watch)(lineFlag, () => {
|
|
54884
|
+
updateAfterDataIndex();
|
|
54885
|
+
});
|
|
54758
54886
|
(0, import_vue105.watch)(reScrollFlag, () => {
|
|
54759
54887
|
updateScrollbar().then(() => {
|
|
54760
54888
|
updateScrollbar();
|