vxe-pc-ui 4.20.32 → 4.20.34
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 +788 -584
- package/dist/all.esm.min.js +3 -3
- package/dist/style.css +127 -2
- package/dist/style.mini.css +1 -1
- package/es/dynamics/index.d.ts +1 -0
- package/es/icon/style.css +1 -1
- package/es/icon/style.mini.css +1 -1
- package/es/modal/index.d.ts +38 -0
- package/es/modal/src/modal.d.ts +9 -0
- package/es/modal/src/modal.js +66 -44
- package/es/select/src/option.js +2 -1
- package/es/select/src/select.js +25 -20
- package/es/style.css +127 -2
- package/es/style.mini.css +1 -1
- package/es/timeline/index.d.ts +92 -0
- package/es/timeline/src/timeline-info.d.ts +6 -0
- package/es/timeline/src/timeline-info.js +19 -0
- package/es/timeline/src/timeline-item.d.ts +11 -8
- package/es/timeline/src/timeline-item.js +33 -45
- package/es/timeline/src/timeline.d.ts +22 -0
- package/es/timeline/src/timeline.js +182 -48
- package/es/timeline/src/util.d.ts +7 -0
- package/es/timeline/src/util.js +41 -0
- package/es/timeline/style.css +122 -0
- package/es/timeline/style.mini.css +1 -0
- package/es/timeline-item/index.d.ts +42 -34
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-icon/style.css +1 -1
- package/es/vxe-icon/style.mini.css +1 -1
- package/es/vxe-timeline/style.css +122 -0
- package/es/vxe-timeline/style.mini.css +1 -0
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.mini.css +1 -1
- package/lib/index.umd.js +976 -771
- package/lib/index.umd.min.js +3 -3
- package/lib/modal/src/modal.js +66 -44
- package/lib/select/src/option.js +2 -1
- package/lib/select/src/select.js +25 -20
- package/lib/style.css +127 -2
- package/lib/style.mini.css +1 -1
- package/lib/timeline/src/timeline-info.js +48 -0
- package/lib/timeline/src/timeline-item.js +32 -54
- package/lib/timeline/src/timeline.js +181 -47
- package/lib/timeline/src/util.js +71 -0
- package/lib/timeline/style/style.css +122 -0
- package/lib/timeline/style/style.mini.css +1 -0
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/vxe-icon/style/style.css +1 -1
- package/lib/vxe-icon/style/style.mini.css +1 -1
- package/lib/vxe-timeline/style/style.css +122 -0
- package/lib/vxe-timeline/style/style.mini.css +1 -0
- package/package.json +10 -3
- package/packages/modal/src/modal.ts +90 -47
- package/packages/select/src/option.ts +3 -1
- package/packages/select/src/select.ts +25 -20
- package/packages/slider/src/slider.ts +1 -16
- package/packages/timeline/src/timeline-info.ts +17 -0
- package/packages/timeline/src/timeline-item.ts +25 -50
- package/packages/timeline/src/timeline.ts +154 -15
- package/packages/timeline/src/util.ts +41 -0
- package/styles/components/timeline.scss +133 -0
- package/styles/theme/dark.scss +2 -1
- package/styles/theme/light.scss +1 -0
- package/styles/variable.scss +2 -1
- package/types/components/modal.d.ts +2 -0
- package/types/components/optgroup.d.ts +0 -1
- package/types/components/option.d.ts +0 -1
- package/types/components/timeline-item.d.ts +21 -17
- package/types/components/timeline.d.ts +41 -8
- /package/dist/{iconfont.1793082793047.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/dist/{iconfont.1793082793047.woff → iconfont.1793330162657.woff} +0 -0
- /package/dist/{iconfont.1793082793047.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/es/icon/{iconfont.1793082793047.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/es/icon/{iconfont.1793082793047.woff → iconfont.1793330162657.woff} +0 -0
- /package/es/icon/{iconfont.1793082793047.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/es/{iconfont.1793082793047.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/es/{iconfont.1793082793047.woff → iconfont.1793330162657.woff} +0 -0
- /package/es/{iconfont.1793082793047.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/es/vxe-icon/{iconfont.1793082793047.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/es/vxe-icon/{iconfont.1793082793047.woff → iconfont.1793330162657.woff} +0 -0
- /package/es/vxe-icon/{iconfont.1793082793047.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1793082793047.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1793082793047.woff → iconfont.1793330162657.woff} +0 -0
- /package/lib/icon/style/{iconfont.1793082793047.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/lib/{iconfont.1793082793047.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/lib/{iconfont.1793082793047.woff → iconfont.1793330162657.woff} +0 -0
- /package/lib/{iconfont.1793082793047.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793082793047.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793082793047.woff → iconfont.1793330162657.woff} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793082793047.woff2 → iconfont.1793330162657.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -2,6 +2,7 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
6
|
var __export = (target, all) => {
|
|
6
7
|
for (var name in all)
|
|
7
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -15,6 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
16
|
return to;
|
|
16
17
|
};
|
|
17
18
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
18
20
|
|
|
19
21
|
// packages_temp/index.ts
|
|
20
22
|
var index_exports = {};
|
|
@@ -210,7 +212,7 @@ __export(index_exports, {
|
|
|
210
212
|
VxeTransfer: () => VxeTransfer,
|
|
211
213
|
VxeTree: () => VxeTree,
|
|
212
214
|
VxeTreeSelect: () => VxeTreeSelect,
|
|
213
|
-
VxeUI: () =>
|
|
215
|
+
VxeUI: () => VxeUI193,
|
|
214
216
|
VxeUpload: () => VxeUpload,
|
|
215
217
|
VxeWatermark: () => VxeWatermark,
|
|
216
218
|
Watermark: () => Watermark,
|
|
@@ -423,7 +425,7 @@ __export(components_exports, {
|
|
|
423
425
|
VxeTransfer: () => VxeTransfer,
|
|
424
426
|
VxeTree: () => VxeTree,
|
|
425
427
|
VxeTreeSelect: () => VxeTreeSelect,
|
|
426
|
-
VxeUI: () =>
|
|
428
|
+
VxeUI: () => VxeUI193,
|
|
427
429
|
VxeUpload: () => VxeUpload,
|
|
428
430
|
VxeWatermark: () => VxeWatermark,
|
|
429
431
|
Watermark: () => Watermark,
|
|
@@ -440,7 +442,7 @@ __export(components_exports, {
|
|
|
440
442
|
version: () => version,
|
|
441
443
|
watermark: () => watermark
|
|
442
444
|
});
|
|
443
|
-
import { VxeUI as
|
|
445
|
+
import { VxeUI as VxeUI193 } from "@vxe-ui/core";
|
|
444
446
|
|
|
445
447
|
// packages_temp/ui/index.ts
|
|
446
448
|
import { VxeUI as VxeUI3, setConfig, setIcon } from "@vxe-ui/core";
|
|
@@ -550,7 +552,7 @@ function checkDynamic() {
|
|
|
550
552
|
// packages_temp/ui/src/log.ts
|
|
551
553
|
import { VxeUI as VxeUI2 } from "@vxe-ui/core";
|
|
552
554
|
var { log } = VxeUI2;
|
|
553
|
-
var uiVersion = `ui v${"4.20.
|
|
555
|
+
var uiVersion = `ui v${"4.20.34"}`;
|
|
554
556
|
function createComponentLog(name) {
|
|
555
557
|
const tableVersion = VxeUI2.tableVersion ? `table v${VxeUI2.tableVersion}` : "";
|
|
556
558
|
const ganttVersion = VxeUI2.ganttVersion ? `gantt v${VxeUI2.ganttVersion}` : "";
|
|
@@ -565,7 +567,7 @@ var warnLog = log.create("warn", uiVersion);
|
|
|
565
567
|
var errLog = log.create("error", uiVersion);
|
|
566
568
|
|
|
567
569
|
// packages_temp/ui/index.ts
|
|
568
|
-
var version = "4.20.
|
|
570
|
+
var version = "4.20.34";
|
|
569
571
|
VxeUI3.uiVersion = version;
|
|
570
572
|
VxeUI3.dynamicApp = dynamicApp;
|
|
571
573
|
function config(options) {
|
|
@@ -34374,7 +34376,7 @@ import { VxeUI as VxeUI115 } from "@vxe-ui/core";
|
|
|
34374
34376
|
var allActiveModals = [];
|
|
34375
34377
|
|
|
34376
34378
|
// packages_temp/modal/src/modal.ts
|
|
34377
|
-
var { getConfig: getConfig45, getIcon: getIcon23, getI18n: getI18n19, globalEvents: globalEvents17, GLOBAL_EVENT_KEYS: GLOBAL_EVENT_KEYS9, createEvent: createEvent49, useFns: useFns38, renderEmptyElement: renderEmptyElement38 } = VxeUI115;
|
|
34379
|
+
var { getConfig: getConfig45, getIcon: getIcon23, getI18n: getI18n19, dbUtils, globalEvents: globalEvents17, GLOBAL_EVENT_KEYS: GLOBAL_EVENT_KEYS9, createEvent: createEvent49, useFns: useFns38, renderEmptyElement: renderEmptyElement38 } = VxeUI115;
|
|
34378
34380
|
var { warnLog: warnLog9, errLog: errLog14 } = createComponentLog("modal");
|
|
34379
34381
|
function createInternalData16() {
|
|
34380
34382
|
return {
|
|
@@ -34566,6 +34568,10 @@ var modal_default = defineVxeComponent({
|
|
|
34566
34568
|
type: Boolean,
|
|
34567
34569
|
default: () => getConfig45().modal.storage
|
|
34568
34570
|
},
|
|
34571
|
+
storeDriver: {
|
|
34572
|
+
type: String,
|
|
34573
|
+
default: () => getConfig45().modal.storeDriver
|
|
34574
|
+
},
|
|
34569
34575
|
storageKey: {
|
|
34570
34576
|
type: String,
|
|
34571
34577
|
default: () => getConfig45().modal.storageKey
|
|
@@ -34680,7 +34686,9 @@ var modal_default = defineVxeComponent({
|
|
|
34680
34686
|
getRefMaps: () => refMaps,
|
|
34681
34687
|
getComputeMaps: () => computeMaps
|
|
34682
34688
|
};
|
|
34683
|
-
|
|
34689
|
+
const posStoreDB = dbUtils.createStore(props.storageKey, {
|
|
34690
|
+
driver: props.storeDriver
|
|
34691
|
+
});
|
|
34684
34692
|
const getBox = () => {
|
|
34685
34693
|
const boxElem = refModalBox.value;
|
|
34686
34694
|
return boxElem;
|
|
@@ -34839,44 +34847,37 @@ var modal_default = defineVxeComponent({
|
|
|
34839
34847
|
closeModal2(type);
|
|
34840
34848
|
}
|
|
34841
34849
|
};
|
|
34842
|
-
const getStorageMap = (key) => {
|
|
34843
|
-
|
|
34844
|
-
const rest = XEUtils71.toStringJSON(localStorage.getItem(key) || "");
|
|
34845
|
-
return rest && rest._v === version2 ? rest : { _v: version2 };
|
|
34850
|
+
const getStorageMap = (key, id) => {
|
|
34851
|
+
return posStoreDB.getById(id).then((dbRest) => dbRest ? dbRest.data : "");
|
|
34846
34852
|
};
|
|
34847
|
-
const
|
|
34848
|
-
|
|
34849
|
-
return !!(id && storage && getStorageMap(storageKey)[id]);
|
|
34853
|
+
const saveStorageMap = (id, posStorage) => {
|
|
34854
|
+
return posStoreDB.updateById(id, posStorage);
|
|
34850
34855
|
};
|
|
34851
|
-
const restorePosStorage = () => {
|
|
34852
|
-
|
|
34853
|
-
|
|
34854
|
-
const
|
|
34855
|
-
if (
|
|
34856
|
-
|
|
34857
|
-
|
|
34858
|
-
if (boxElem) {
|
|
34859
|
-
if (left) {
|
|
34860
|
-
boxElem.style.left = `${left}px`;
|
|
34861
|
-
}
|
|
34862
|
-
if (top) {
|
|
34863
|
-
boxElem.style.top = `${top}px`;
|
|
34864
|
-
}
|
|
34865
|
-
if (width) {
|
|
34866
|
-
boxElem.style.width = `${width}px`;
|
|
34867
|
-
}
|
|
34868
|
-
if (height) {
|
|
34869
|
-
boxElem.style.height = `${height}px`;
|
|
34870
|
-
}
|
|
34856
|
+
const restorePosStorage = (posStorage) => {
|
|
34857
|
+
if (posStorage) {
|
|
34858
|
+
const boxElem = getBox();
|
|
34859
|
+
const [left, top, width, height, zoomLeft, zoomTop, zoomWidth, zoomHeight] = posStorage.split(",");
|
|
34860
|
+
if (boxElem) {
|
|
34861
|
+
if (left) {
|
|
34862
|
+
boxElem.style.left = `${left}px`;
|
|
34871
34863
|
}
|
|
34872
|
-
if (
|
|
34873
|
-
|
|
34874
|
-
|
|
34875
|
-
|
|
34876
|
-
|
|
34877
|
-
height: zoomHeight
|
|
34878
|
-
};
|
|
34864
|
+
if (top) {
|
|
34865
|
+
boxElem.style.top = `${top}px`;
|
|
34866
|
+
}
|
|
34867
|
+
if (width) {
|
|
34868
|
+
boxElem.style.width = `${width}px`;
|
|
34879
34869
|
}
|
|
34870
|
+
if (height) {
|
|
34871
|
+
boxElem.style.height = `${height}px`;
|
|
34872
|
+
}
|
|
34873
|
+
}
|
|
34874
|
+
if (zoomLeft && zoomTop) {
|
|
34875
|
+
reactData.revertLocat = {
|
|
34876
|
+
left: XEUtils71.toNumber(zoomLeft),
|
|
34877
|
+
top: XEUtils71.toNumber(zoomTop),
|
|
34878
|
+
width: XEUtils71.toNumber(zoomWidth),
|
|
34879
|
+
height: XEUtils71.toNumber(zoomHeight)
|
|
34880
|
+
};
|
|
34880
34881
|
}
|
|
34881
34882
|
}
|
|
34882
34883
|
};
|
|
@@ -34889,7 +34890,7 @@ var modal_default = defineVxeComponent({
|
|
|
34889
34890
|
updateStyle();
|
|
34890
34891
|
};
|
|
34891
34892
|
const savePosStorage = () => {
|
|
34892
|
-
const { id, storage
|
|
34893
|
+
const { id, storage } = props;
|
|
34893
34894
|
const { zoomStatus, revertLocat } = reactData;
|
|
34894
34895
|
if (zoomStatus) {
|
|
34895
34896
|
return;
|
|
@@ -34899,9 +34900,19 @@ var modal_default = defineVxeComponent({
|
|
|
34899
34900
|
if (!boxElem) {
|
|
34900
34901
|
return;
|
|
34901
34902
|
}
|
|
34902
|
-
const
|
|
34903
|
-
|
|
34904
|
-
|
|
34903
|
+
const posStorage = [
|
|
34904
|
+
boxElem.style.left,
|
|
34905
|
+
boxElem.style.top,
|
|
34906
|
+
boxElem.clientWidth,
|
|
34907
|
+
boxElem.clientHeight,
|
|
34908
|
+
...revertLocat ? [
|
|
34909
|
+
revertLocat.left,
|
|
34910
|
+
revertLocat.top,
|
|
34911
|
+
revertLocat.width,
|
|
34912
|
+
revertLocat.height
|
|
34913
|
+
] : []
|
|
34914
|
+
].map((val) => val ? XEUtils71.toNumber(val) : "").join(",");
|
|
34915
|
+
saveStorageMap(id, posStorage);
|
|
34905
34916
|
}
|
|
34906
34917
|
};
|
|
34907
34918
|
const handleMinimize = () => {
|
|
@@ -35085,7 +35096,7 @@ var modal_default = defineVxeComponent({
|
|
|
35085
35096
|
}
|
|
35086
35097
|
};
|
|
35087
35098
|
const openModal2 = () => {
|
|
35088
|
-
const { remember, showFooter, fullscreen } = props;
|
|
35099
|
+
const { storageKey, id, remember, showFooter, fullscreen } = props;
|
|
35089
35100
|
const { initialized, visible } = reactData;
|
|
35090
35101
|
const isMsg = computeIsMsg.value;
|
|
35091
35102
|
const isModal = computeIsModal.value;
|
|
@@ -35131,8 +35142,21 @@ var modal_default = defineVxeComponent({
|
|
|
35131
35142
|
}
|
|
35132
35143
|
if (firstOpen) {
|
|
35133
35144
|
reactData.firstOpen = false;
|
|
35134
|
-
if (
|
|
35135
|
-
|
|
35145
|
+
if (storageKey && id) {
|
|
35146
|
+
getStorageMap(storageKey, id).then((posStorage) => {
|
|
35147
|
+
if (posStorage) {
|
|
35148
|
+
restorePosStorage(posStorage);
|
|
35149
|
+
} else {
|
|
35150
|
+
if (isModal && fullscreen) {
|
|
35151
|
+
nextTick22(() => handleMaximize());
|
|
35152
|
+
} else {
|
|
35153
|
+
recalculate();
|
|
35154
|
+
updatePosition().then(() => {
|
|
35155
|
+
setTimeout(() => updatePosition(), 20);
|
|
35156
|
+
});
|
|
35157
|
+
}
|
|
35158
|
+
}
|
|
35159
|
+
});
|
|
35136
35160
|
} else {
|
|
35137
35161
|
if (isModal && fullscreen) {
|
|
35138
35162
|
nextTick22(() => handleMaximize());
|
|
@@ -35536,7 +35560,7 @@ var modal_default = defineVxeComponent({
|
|
|
35536
35560
|
const emitModel = (value) => {
|
|
35537
35561
|
emit("update:modelValue", value);
|
|
35538
35562
|
};
|
|
35539
|
-
modalMethods = {
|
|
35563
|
+
const modalMethods = {
|
|
35540
35564
|
dispatchEvent,
|
|
35541
35565
|
open: openModal2,
|
|
35542
35566
|
close() {
|
|
@@ -36487,7 +36511,8 @@ var option_default = defineVxeComponent({
|
|
|
36487
36511
|
disabled: Boolean
|
|
36488
36512
|
},
|
|
36489
36513
|
emits: [],
|
|
36490
|
-
setup(props,
|
|
36514
|
+
setup(props, context) {
|
|
36515
|
+
const { slots } = context;
|
|
36491
36516
|
const elem = ref50();
|
|
36492
36517
|
const $xeSelect = inject27("$xeSelect", {});
|
|
36493
36518
|
const $xeOptgroup = inject27("$xeOptgroup", null);
|
|
@@ -36819,10 +36844,10 @@ var select_default = defineVxeComponent({
|
|
|
36819
36844
|
return Object.assign({}, props.defaultConfig);
|
|
36820
36845
|
});
|
|
36821
36846
|
const computePropsOpts = computed42(() => {
|
|
36822
|
-
return Object.assign({}, props.optionProps);
|
|
36847
|
+
return Object.assign({}, getConfig47().select.optionProps, props.optionProps);
|
|
36823
36848
|
});
|
|
36824
36849
|
const computeGroupPropsOpts = computed42(() => {
|
|
36825
|
-
return Object.assign({}, props.optionGroupProps);
|
|
36850
|
+
return Object.assign({}, getConfig47().select.optionGroupProps, props.optionGroupProps);
|
|
36826
36851
|
});
|
|
36827
36852
|
const computeLabelField = computed42(() => {
|
|
36828
36853
|
const propsOpts = computePropsOpts.value;
|
|
@@ -38571,24 +38596,29 @@ var select_default = defineVxeComponent({
|
|
|
38571
38596
|
]
|
|
38572
38597
|
);
|
|
38573
38598
|
};
|
|
38574
|
-
watch32(
|
|
38575
|
-
()
|
|
38576
|
-
|
|
38577
|
-
|
|
38578
|
-
|
|
38579
|
-
|
|
38580
|
-
|
|
38581
|
-
|
|
38582
|
-
|
|
38583
|
-
|
|
38584
|
-
|
|
38585
|
-
|
|
38586
|
-
|
|
38587
|
-
|
|
38588
|
-
|
|
38589
|
-
|
|
38590
|
-
|
|
38591
|
-
)
|
|
38599
|
+
watch32(() => reactData.staticOptions, (val) => {
|
|
38600
|
+
loadData(val);
|
|
38601
|
+
});
|
|
38602
|
+
const refOptsFlag = ref51(0);
|
|
38603
|
+
watch32(() => props.options, () => {
|
|
38604
|
+
refOptsFlag.value++;
|
|
38605
|
+
});
|
|
38606
|
+
watch32(() => props.options ? props.options.length : -1, () => {
|
|
38607
|
+
refOptsFlag.value++;
|
|
38608
|
+
});
|
|
38609
|
+
watch32(refOptsFlag, () => {
|
|
38610
|
+
loadData(props.options || []);
|
|
38611
|
+
});
|
|
38612
|
+
const refOptGrpsFlag = ref51(0);
|
|
38613
|
+
watch32(() => props.optionGroups, () => {
|
|
38614
|
+
refOptGrpsFlag.value++;
|
|
38615
|
+
});
|
|
38616
|
+
watch32(() => props.optionGroups ? props.optionGroups.length : -1, () => {
|
|
38617
|
+
refOptGrpsFlag.value++;
|
|
38618
|
+
});
|
|
38619
|
+
watch32(refOptGrpsFlag, () => {
|
|
38620
|
+
loadData(props.optionGroups || []);
|
|
38621
|
+
});
|
|
38592
38622
|
const reScrollFlag = ref51(0);
|
|
38593
38623
|
const reLayoutFlag = ref51(0);
|
|
38594
38624
|
watch32(computeIsVScrollbar, () => {
|
|
@@ -48044,57 +48074,190 @@ var textarea_default2 = VxeTextarea;
|
|
|
48044
48074
|
import { VxeUI as VxeUI176 } from "@vxe-ui/core";
|
|
48045
48075
|
|
|
48046
48076
|
// packages_temp/timeline/src/timeline.ts
|
|
48047
|
-
import { ref as ref74, h as h88, reactive as reactive80 } from "vue";
|
|
48077
|
+
import { ref as ref74, h as h88, reactive as reactive80, computed as computed60, watch as watch47, provide as provide31, onMounted as onMounted51, onBeforeUnmount as onBeforeUnmount21 } from "vue";
|
|
48048
48078
|
import XEUtils105 from "xe-utils";
|
|
48049
48079
|
import { VxeUI as VxeUI175 } from "@vxe-ui/core";
|
|
48050
|
-
var { getConfig: getConfig68, createEvent: createEvent77 } = VxeUI175;
|
|
48051
|
-
|
|
48052
|
-
|
|
48053
|
-
|
|
48054
|
-
|
|
48055
|
-
|
|
48056
|
-
|
|
48057
|
-
|
|
48058
|
-
|
|
48059
|
-
|
|
48060
|
-
|
|
48061
|
-
|
|
48062
|
-
|
|
48063
|
-
|
|
48064
|
-
|
|
48065
|
-
|
|
48066
|
-
|
|
48067
|
-
|
|
48068
|
-
|
|
48069
|
-
|
|
48070
|
-
|
|
48071
|
-
|
|
48072
|
-
|
|
48073
|
-
|
|
48074
|
-
|
|
48075
|
-
|
|
48076
|
-
|
|
48077
|
-
|
|
48078
|
-
|
|
48079
|
-
|
|
48080
|
-
|
|
48081
|
-
|
|
48082
|
-
}
|
|
48083
|
-
|
|
48084
|
-
|
|
48085
|
-
|
|
48086
|
-
|
|
48087
|
-
|
|
48088
|
-
|
|
48080
|
+
var { getConfig: getConfig68, useFns: useFns59, createEvent: createEvent77 } = VxeUI175;
|
|
48081
|
+
function createInternalData23() {
|
|
48082
|
+
return {
|
|
48083
|
+
fullData: []
|
|
48084
|
+
};
|
|
48085
|
+
}
|
|
48086
|
+
function createReactData24() {
|
|
48087
|
+
return {
|
|
48088
|
+
itemList: [],
|
|
48089
|
+
staticItems: [],
|
|
48090
|
+
isOptConf: false
|
|
48091
|
+
};
|
|
48092
|
+
}
|
|
48093
|
+
var timeline_default = (
|
|
48094
|
+
/* define-vxe-component start */
|
|
48095
|
+
defineVxeComponent({
|
|
48096
|
+
name: "VxeTimeline",
|
|
48097
|
+
props: {
|
|
48098
|
+
size: {
|
|
48099
|
+
type: String,
|
|
48100
|
+
default: () => getConfig68().timeline.size || getConfig68().size
|
|
48101
|
+
},
|
|
48102
|
+
options: Array,
|
|
48103
|
+
reverse: {
|
|
48104
|
+
type: Boolean,
|
|
48105
|
+
default: () => getConfig68().timeline.reverse
|
|
48106
|
+
},
|
|
48107
|
+
vertical: {
|
|
48108
|
+
type: Boolean,
|
|
48109
|
+
default: () => getConfig68().timeline.vertical
|
|
48110
|
+
},
|
|
48111
|
+
optionProps: Object
|
|
48112
|
+
},
|
|
48113
|
+
emits: [],
|
|
48114
|
+
setup(props, context) {
|
|
48115
|
+
const { slots, emit } = context;
|
|
48116
|
+
const xID = XEUtils105.uniqueId();
|
|
48117
|
+
const { computeSize } = useFns59.useSize(props);
|
|
48118
|
+
const refElem = ref74();
|
|
48119
|
+
const reactData = reactive80(createReactData24());
|
|
48120
|
+
const internalData = createInternalData23();
|
|
48121
|
+
const refMaps = {
|
|
48122
|
+
refElem
|
|
48123
|
+
};
|
|
48124
|
+
const computeMaps = {};
|
|
48125
|
+
const $xeTimeline = {
|
|
48126
|
+
xID,
|
|
48127
|
+
props,
|
|
48128
|
+
context,
|
|
48129
|
+
reactData,
|
|
48130
|
+
internalData,
|
|
48131
|
+
getRefMaps: () => refMaps,
|
|
48132
|
+
getComputeMaps: () => computeMaps
|
|
48133
|
+
};
|
|
48134
|
+
const computePropsOpts = computed60(() => {
|
|
48135
|
+
return Object.assign({}, getConfig68().timeline.optionProps, props.optionProps);
|
|
48089
48136
|
});
|
|
48090
|
-
|
|
48091
|
-
|
|
48092
|
-
|
|
48093
|
-
|
|
48094
|
-
|
|
48095
|
-
|
|
48096
|
-
|
|
48097
|
-
});
|
|
48137
|
+
const computeTitleField = computed60(() => {
|
|
48138
|
+
const propsOpts = computePropsOpts.value;
|
|
48139
|
+
return propsOpts.title || "title";
|
|
48140
|
+
});
|
|
48141
|
+
const computeContentField = computed60(() => {
|
|
48142
|
+
const propsOpts = computePropsOpts.value;
|
|
48143
|
+
return propsOpts.content || "content";
|
|
48144
|
+
});
|
|
48145
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
48146
|
+
emit(type, createEvent77(evnt, { $timeline: $xeTimeline }, params));
|
|
48147
|
+
};
|
|
48148
|
+
const loadData = (opts, isOptConf) => {
|
|
48149
|
+
reactData.isOptConf = isOptConf;
|
|
48150
|
+
internalData.fullData = opts || [];
|
|
48151
|
+
updateItems();
|
|
48152
|
+
};
|
|
48153
|
+
const updateItems = () => {
|
|
48154
|
+
const { reverse } = props;
|
|
48155
|
+
const { fullData } = internalData;
|
|
48156
|
+
reactData.itemList = reverse ? fullData.slice(0).reverse() : fullData.slice(0);
|
|
48157
|
+
};
|
|
48158
|
+
const timelineMethods = {
|
|
48159
|
+
dispatchEvent
|
|
48160
|
+
};
|
|
48161
|
+
const timelinePrivateMethods = {};
|
|
48162
|
+
Object.assign($xeTimeline, timelineMethods, timelinePrivateMethods);
|
|
48163
|
+
const renderItem = (item, index) => {
|
|
48164
|
+
const { itemList, isOptConf } = reactData;
|
|
48165
|
+
const titleField = computeTitleField.value;
|
|
48166
|
+
const contentField = computeContentField.value;
|
|
48167
|
+
const titleVal = getText(isOptConf ? item[titleField] : item.title);
|
|
48168
|
+
const contentVal = getText(isOptConf ? item[contentField] : item.content);
|
|
48169
|
+
const titleSlot = slots.title;
|
|
48170
|
+
const contentSlot = slots.content;
|
|
48171
|
+
return h88(
|
|
48172
|
+
"div",
|
|
48173
|
+
{
|
|
48174
|
+
key: index,
|
|
48175
|
+
class: ["vxe-timeline--item", {
|
|
48176
|
+
"is--last": index === itemList.length - 1
|
|
48177
|
+
}]
|
|
48178
|
+
},
|
|
48179
|
+
[
|
|
48180
|
+
h88("div", {
|
|
48181
|
+
class: "vxe-timeline--item-line"
|
|
48182
|
+
}),
|
|
48183
|
+
h88("div", {
|
|
48184
|
+
class: "vxe-timeline--item-node"
|
|
48185
|
+
}),
|
|
48186
|
+
h88("div", {
|
|
48187
|
+
class: "vxe-timeline--item-wrapper"
|
|
48188
|
+
}, [
|
|
48189
|
+
h88("div", {
|
|
48190
|
+
class: "vxe-timeline--item-title"
|
|
48191
|
+
}, titleSlot ? titleSlot({ item }) : titleVal),
|
|
48192
|
+
h88("div", {
|
|
48193
|
+
class: "vxe-timeline--item-content"
|
|
48194
|
+
}, contentSlot ? contentSlot({ item }) : contentVal)
|
|
48195
|
+
])
|
|
48196
|
+
]
|
|
48197
|
+
);
|
|
48198
|
+
};
|
|
48199
|
+
const renderVN = () => {
|
|
48200
|
+
const { vertical } = props;
|
|
48201
|
+
const { itemList } = reactData;
|
|
48202
|
+
const vSize = computeSize.value;
|
|
48203
|
+
const defaultSlot = slots.default;
|
|
48204
|
+
return h88(
|
|
48205
|
+
"div",
|
|
48206
|
+
{
|
|
48207
|
+
ref: refElem,
|
|
48208
|
+
class: ["vxe-timeline", {
|
|
48209
|
+
[`size--${vSize}`]: vSize,
|
|
48210
|
+
"is--vertical": vertical,
|
|
48211
|
+
"is--horizontal": !vertical
|
|
48212
|
+
}]
|
|
48213
|
+
},
|
|
48214
|
+
[
|
|
48215
|
+
h88("div", {
|
|
48216
|
+
class: "vxe-timeline--slots"
|
|
48217
|
+
}, defaultSlot ? defaultSlot({}) : []),
|
|
48218
|
+
h88("div", {
|
|
48219
|
+
class: "vxe-timeline--body"
|
|
48220
|
+
}, itemList.map((item, index) => renderItem(item, index)))
|
|
48221
|
+
]
|
|
48222
|
+
);
|
|
48223
|
+
};
|
|
48224
|
+
watch47(() => reactData.staticItems, (val) => {
|
|
48225
|
+
loadData(val, false);
|
|
48226
|
+
});
|
|
48227
|
+
const refOptsFlag = ref74(0);
|
|
48228
|
+
watch47(() => props.options, () => {
|
|
48229
|
+
refOptsFlag.value++;
|
|
48230
|
+
});
|
|
48231
|
+
watch47(() => props.options ? props.options.length : -1, () => {
|
|
48232
|
+
refOptsFlag.value++;
|
|
48233
|
+
});
|
|
48234
|
+
watch47(refOptsFlag, () => {
|
|
48235
|
+
loadData(props.options || [], true);
|
|
48236
|
+
});
|
|
48237
|
+
watch47(() => props.reverse, () => {
|
|
48238
|
+
updateItems();
|
|
48239
|
+
});
|
|
48240
|
+
onMounted51(() => {
|
|
48241
|
+
const { staticItems } = reactData;
|
|
48242
|
+
if (staticItems.length) {
|
|
48243
|
+
loadData(staticItems, false);
|
|
48244
|
+
} else {
|
|
48245
|
+
loadData(props.options || [], true);
|
|
48246
|
+
}
|
|
48247
|
+
});
|
|
48248
|
+
onBeforeUnmount21(() => {
|
|
48249
|
+
XEUtils105.assign(reactData, createReactData24());
|
|
48250
|
+
XEUtils105.assign(internalData, createInternalData23());
|
|
48251
|
+
});
|
|
48252
|
+
provide31("$xeTimeline", $xeTimeline);
|
|
48253
|
+
$xeTimeline.renderVN = renderVN;
|
|
48254
|
+
return $xeTimeline;
|
|
48255
|
+
},
|
|
48256
|
+
render() {
|
|
48257
|
+
return this.renderVN();
|
|
48258
|
+
}
|
|
48259
|
+
})
|
|
48260
|
+
);
|
|
48098
48261
|
|
|
48099
48262
|
// packages_temp/timeline/index.ts
|
|
48100
48263
|
var VxeTimeline = Object.assign({}, timeline_default, {
|
|
@@ -48108,55 +48271,96 @@ var Timeline = VxeTimeline;
|
|
|
48108
48271
|
var timeline_default2 = VxeTimeline;
|
|
48109
48272
|
|
|
48110
48273
|
// packages_temp/timeline-item/index.ts
|
|
48111
|
-
import { VxeUI as
|
|
48274
|
+
import { VxeUI as VxeUI177 } from "@vxe-ui/core";
|
|
48112
48275
|
|
|
48113
48276
|
// packages_temp/timeline/src/timeline-item.ts
|
|
48114
|
-
import { ref as ref75, h as h89,
|
|
48277
|
+
import { ref as ref75, h as h89, inject as inject44, onMounted as onMounted52, onUnmounted as onUnmounted31 } from "vue";
|
|
48278
|
+
|
|
48279
|
+
// packages_temp/timeline/src/util.ts
|
|
48280
|
+
import { watch as watch48 } from "vue";
|
|
48281
|
+
import XEUtils107 from "xe-utils";
|
|
48282
|
+
|
|
48283
|
+
// packages_temp/timeline/src/timeline-info.ts
|
|
48115
48284
|
import XEUtils106 from "xe-utils";
|
|
48116
|
-
|
|
48117
|
-
|
|
48118
|
-
|
|
48119
|
-
|
|
48120
|
-
|
|
48121
|
-
|
|
48122
|
-
|
|
48123
|
-
const { emit } = context;
|
|
48124
|
-
const xID = XEUtils106.uniqueId();
|
|
48125
|
-
const refElem = ref75();
|
|
48126
|
-
const reactData = reactive81({});
|
|
48127
|
-
const refMaps = {
|
|
48128
|
-
refElem
|
|
48129
|
-
};
|
|
48130
|
-
const computeMaps = {};
|
|
48131
|
-
const $xeTimelineItem = {
|
|
48132
|
-
xID,
|
|
48133
|
-
props,
|
|
48134
|
-
context,
|
|
48135
|
-
reactData,
|
|
48136
|
-
getRefMaps: () => refMaps,
|
|
48137
|
-
getComputeMaps: () => computeMaps
|
|
48138
|
-
};
|
|
48139
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
48140
|
-
emit(type, createEvent78(evnt, { $timelineItem: $xeTimelineItem }, params));
|
|
48141
|
-
};
|
|
48142
|
-
const tagMethods = {
|
|
48143
|
-
dispatchEvent
|
|
48144
|
-
};
|
|
48145
|
-
const tagPrivateMethods = {};
|
|
48146
|
-
Object.assign($xeTimelineItem, tagMethods, tagPrivateMethods);
|
|
48147
|
-
const renderVN = () => {
|
|
48148
|
-
return h89("div", {
|
|
48149
|
-
ref: refElem,
|
|
48150
|
-
class: "vxe-timeline-item"
|
|
48151
|
-
});
|
|
48152
|
-
};
|
|
48153
|
-
$xeTimelineItem.renderVN = renderVN;
|
|
48154
|
-
return $xeTimelineItem;
|
|
48155
|
-
},
|
|
48156
|
-
render() {
|
|
48157
|
-
return this.renderVN();
|
|
48285
|
+
var TimelineItemInfo = class {
|
|
48286
|
+
constructor($xeTimeline, _vm) {
|
|
48287
|
+
__publicField(this, "id", XEUtils106.uniqueId("timeline_item_"));
|
|
48288
|
+
Object.assign(this, {
|
|
48289
|
+
title: _vm.title,
|
|
48290
|
+
content: _vm.content
|
|
48291
|
+
});
|
|
48158
48292
|
}
|
|
48159
|
-
|
|
48293
|
+
update(name, value) {
|
|
48294
|
+
this[name] = value;
|
|
48295
|
+
}
|
|
48296
|
+
};
|
|
48297
|
+
|
|
48298
|
+
// packages_temp/timeline/src/util.ts
|
|
48299
|
+
function isTimelineItem(item) {
|
|
48300
|
+
return item instanceof TimelineItemInfo;
|
|
48301
|
+
}
|
|
48302
|
+
function createTimelineItem($xeTimeline, _vm) {
|
|
48303
|
+
return isTimelineItem(_vm) ? _vm : new TimelineItemInfo($xeTimeline, _vm);
|
|
48304
|
+
}
|
|
48305
|
+
function watchTimelineItem(props, itemInfo) {
|
|
48306
|
+
Object.keys(props).forEach((name) => {
|
|
48307
|
+
watch48(() => props[name], (value) => {
|
|
48308
|
+
itemInfo.update(name, value);
|
|
48309
|
+
});
|
|
48310
|
+
});
|
|
48311
|
+
}
|
|
48312
|
+
function assembleTimelineItem($xeTimeline, el, itemInfo) {
|
|
48313
|
+
const { reactData } = $xeTimeline;
|
|
48314
|
+
const { staticItems } = reactData;
|
|
48315
|
+
const parentElem = el.parentNode;
|
|
48316
|
+
if (parentElem && staticItems) {
|
|
48317
|
+
staticItems.splice(XEUtils107.arrayIndexOf(parentElem.children, el), 0, itemInfo);
|
|
48318
|
+
reactData.staticItems = staticItems.slice(0);
|
|
48319
|
+
}
|
|
48320
|
+
}
|
|
48321
|
+
function destroyTimelineItem($xeTimeline, itemInfo) {
|
|
48322
|
+
const { reactData } = $xeTimeline;
|
|
48323
|
+
const { staticItems } = reactData;
|
|
48324
|
+
const index = XEUtils107.findIndexOf(staticItems, (item) => item.id === itemInfo.id);
|
|
48325
|
+
if (index > -1) {
|
|
48326
|
+
staticItems.splice(index, 1);
|
|
48327
|
+
}
|
|
48328
|
+
reactData.staticItems = staticItems.slice(0);
|
|
48329
|
+
}
|
|
48330
|
+
|
|
48331
|
+
// packages_temp/timeline/src/timeline-item.ts
|
|
48332
|
+
var timeline_item_default = (
|
|
48333
|
+
/* define-vxe-component start */
|
|
48334
|
+
defineVxeComponent({
|
|
48335
|
+
name: "VxeTimelineItem",
|
|
48336
|
+
props: {
|
|
48337
|
+
title: [String, Number],
|
|
48338
|
+
content: [String, Number]
|
|
48339
|
+
},
|
|
48340
|
+
setup(props, context) {
|
|
48341
|
+
const { slots } = context;
|
|
48342
|
+
const refElem = ref75();
|
|
48343
|
+
const $xeTimeline = inject44("$xeTimeline", {});
|
|
48344
|
+
const itemConfig = createTimelineItem($xeTimeline, props);
|
|
48345
|
+
itemConfig.slots = slots;
|
|
48346
|
+
watchTimelineItem(props, itemConfig);
|
|
48347
|
+
onMounted52(() => {
|
|
48348
|
+
const el = refElem.value;
|
|
48349
|
+
if (el) {
|
|
48350
|
+
assembleTimelineItem($xeTimeline, el, itemConfig);
|
|
48351
|
+
}
|
|
48352
|
+
});
|
|
48353
|
+
onUnmounted31(() => {
|
|
48354
|
+
destroyTimelineItem($xeTimeline, itemConfig);
|
|
48355
|
+
});
|
|
48356
|
+
return () => {
|
|
48357
|
+
return h89("div", {
|
|
48358
|
+
ref: refElem
|
|
48359
|
+
});
|
|
48360
|
+
};
|
|
48361
|
+
}
|
|
48362
|
+
})
|
|
48363
|
+
);
|
|
48160
48364
|
|
|
48161
48365
|
// packages_temp/timeline-item/index.ts
|
|
48162
48366
|
var VxeTimelineItem = Object.assign({}, timeline_item_default, {
|
|
@@ -48165,18 +48369,18 @@ var VxeTimelineItem = Object.assign({}, timeline_item_default, {
|
|
|
48165
48369
|
}
|
|
48166
48370
|
});
|
|
48167
48371
|
dynamicApp.use(VxeTimelineItem);
|
|
48168
|
-
|
|
48372
|
+
VxeUI177.component(timeline_item_default);
|
|
48169
48373
|
var TimelineItem = VxeTimelineItem;
|
|
48170
48374
|
var timeline_item_default2 = VxeTimelineItem;
|
|
48171
48375
|
|
|
48172
48376
|
// packages_temp/tip/index.ts
|
|
48173
|
-
import { VxeUI as
|
|
48377
|
+
import { VxeUI as VxeUI179 } from "@vxe-ui/core";
|
|
48174
48378
|
|
|
48175
48379
|
// packages_temp/tip/src/tip.ts
|
|
48176
|
-
import { ref as ref76, h as h90, reactive as
|
|
48177
|
-
import
|
|
48178
|
-
import { VxeUI as
|
|
48179
|
-
var { getConfig: getConfig69, useFns:
|
|
48380
|
+
import { ref as ref76, h as h90, reactive as reactive81 } from "vue";
|
|
48381
|
+
import XEUtils108 from "xe-utils";
|
|
48382
|
+
import { VxeUI as VxeUI178 } from "@vxe-ui/core";
|
|
48383
|
+
var { getConfig: getConfig69, useFns: useFns60, createEvent: createEvent78, renderEmptyElement: renderEmptyElement56 } = VxeUI178;
|
|
48180
48384
|
var tip_default = defineVxeComponent({
|
|
48181
48385
|
name: "VxeTip",
|
|
48182
48386
|
props: {
|
|
@@ -48202,11 +48406,11 @@ var tip_default = defineVxeComponent({
|
|
|
48202
48406
|
emits: [],
|
|
48203
48407
|
setup(props, context) {
|
|
48204
48408
|
const { slots, emit } = context;
|
|
48205
|
-
const xID =
|
|
48206
|
-
const { computeSize } =
|
|
48207
|
-
const { computePermissionInfo } =
|
|
48409
|
+
const xID = XEUtils108.uniqueId();
|
|
48410
|
+
const { computeSize } = useFns60.useSize(props);
|
|
48411
|
+
const { computePermissionInfo } = useFns60.usePermission(props);
|
|
48208
48412
|
const refElem = ref76();
|
|
48209
|
-
const reactData =
|
|
48413
|
+
const reactData = reactive81({});
|
|
48210
48414
|
const refMaps = {
|
|
48211
48415
|
refElem
|
|
48212
48416
|
};
|
|
@@ -48220,7 +48424,7 @@ var tip_default = defineVxeComponent({
|
|
|
48220
48424
|
getComputeMaps: () => computeMaps
|
|
48221
48425
|
};
|
|
48222
48426
|
const dispatchEvent = (type, params, evnt) => {
|
|
48223
|
-
emit(type,
|
|
48427
|
+
emit(type, createEvent78(evnt, { $tip: $xeTip }, params));
|
|
48224
48428
|
};
|
|
48225
48429
|
const tipMethods = {
|
|
48226
48430
|
dispatchEvent
|
|
@@ -48273,14 +48477,14 @@ var tip_default = defineVxeComponent({
|
|
|
48273
48477
|
{
|
|
48274
48478
|
class: "vxe-tip--title"
|
|
48275
48479
|
},
|
|
48276
|
-
titleSlot ? getSlotVNs(titleSlot({})) :
|
|
48480
|
+
titleSlot ? getSlotVNs(titleSlot({})) : XEUtils108.toValueString(title)
|
|
48277
48481
|
) : renderEmptyElement56($xeTip),
|
|
48278
48482
|
h90(
|
|
48279
48483
|
"div",
|
|
48280
48484
|
{
|
|
48281
48485
|
class: "vxe-tip--content"
|
|
48282
48486
|
},
|
|
48283
|
-
defaultSlot ? getSlotVNs(defaultSlot({})) :
|
|
48487
|
+
defaultSlot ? getSlotVNs(defaultSlot({})) : XEUtils108.toValueString(content)
|
|
48284
48488
|
)
|
|
48285
48489
|
]
|
|
48286
48490
|
)
|
|
@@ -48303,19 +48507,19 @@ var VxeTip = Object.assign({}, tip_default, {
|
|
|
48303
48507
|
}
|
|
48304
48508
|
});
|
|
48305
48509
|
dynamicApp.use(VxeTip);
|
|
48306
|
-
|
|
48510
|
+
VxeUI179.component(tip_default);
|
|
48307
48511
|
var Tips = VxeTip;
|
|
48308
48512
|
var Tip = VxeTip;
|
|
48309
48513
|
var tip_default2 = VxeTip;
|
|
48310
48514
|
|
|
48311
48515
|
// packages_temp/tour/index.ts
|
|
48312
|
-
import { VxeUI as
|
|
48516
|
+
import { VxeUI as VxeUI181 } from "@vxe-ui/core";
|
|
48313
48517
|
|
|
48314
48518
|
// packages_temp/tour/src/tour.ts
|
|
48315
|
-
import { ref as ref77, h as h91, reactive as
|
|
48316
|
-
import
|
|
48317
|
-
import { VxeUI as
|
|
48318
|
-
var { getConfig: getConfig70, createEvent:
|
|
48519
|
+
import { ref as ref77, h as h91, reactive as reactive82 } from "vue";
|
|
48520
|
+
import XEUtils109 from "xe-utils";
|
|
48521
|
+
import { VxeUI as VxeUI180 } from "@vxe-ui/core";
|
|
48522
|
+
var { getConfig: getConfig70, createEvent: createEvent79 } = VxeUI180;
|
|
48319
48523
|
var tour_default = defineVxeComponent({
|
|
48320
48524
|
name: "VxeTour",
|
|
48321
48525
|
props: {
|
|
@@ -48327,9 +48531,9 @@ var tour_default = defineVxeComponent({
|
|
|
48327
48531
|
emits: [],
|
|
48328
48532
|
setup(props, context) {
|
|
48329
48533
|
const { emit } = context;
|
|
48330
|
-
const xID =
|
|
48534
|
+
const xID = XEUtils109.uniqueId();
|
|
48331
48535
|
const refElem = ref77();
|
|
48332
|
-
const reactData =
|
|
48536
|
+
const reactData = reactive82({});
|
|
48333
48537
|
const refMaps = {
|
|
48334
48538
|
refElem
|
|
48335
48539
|
};
|
|
@@ -48343,7 +48547,7 @@ var tour_default = defineVxeComponent({
|
|
|
48343
48547
|
getComputeMaps: () => computeMaps
|
|
48344
48548
|
};
|
|
48345
48549
|
const dispatchEvent = (type, params, evnt) => {
|
|
48346
|
-
emit(type,
|
|
48550
|
+
emit(type, createEvent79(evnt, { $tour: $xeTour }, params));
|
|
48347
48551
|
};
|
|
48348
48552
|
const tagMethods = {
|
|
48349
48553
|
dispatchEvent
|
|
@@ -48371,22 +48575,22 @@ var VxeTour = Object.assign({}, tour_default, {
|
|
|
48371
48575
|
}
|
|
48372
48576
|
});
|
|
48373
48577
|
dynamicApp.use(VxeTour);
|
|
48374
|
-
|
|
48578
|
+
VxeUI181.component(tour_default);
|
|
48375
48579
|
var Tour = VxeTour;
|
|
48376
48580
|
var tour_default2 = VxeTour;
|
|
48377
48581
|
|
|
48378
48582
|
// packages_temp/transfer/index.ts
|
|
48379
|
-
import { VxeUI as
|
|
48583
|
+
import { VxeUI as VxeUI183 } from "@vxe-ui/core";
|
|
48380
48584
|
|
|
48381
48585
|
// packages_temp/transfer/src/transfer.ts
|
|
48382
|
-
import { ref as ref78, h as h92, reactive as
|
|
48383
|
-
import
|
|
48384
|
-
import { VxeUI as
|
|
48385
|
-
var { getConfig: getConfig71, createEvent:
|
|
48386
|
-
function
|
|
48586
|
+
import { ref as ref78, h as h92, reactive as reactive83, onBeforeUnmount as onBeforeUnmount22 } from "vue";
|
|
48587
|
+
import XEUtils110 from "xe-utils";
|
|
48588
|
+
import { VxeUI as VxeUI182 } from "@vxe-ui/core";
|
|
48589
|
+
var { getConfig: getConfig71, createEvent: createEvent80, renderEmptyElement: renderEmptyElement57 } = VxeUI182;
|
|
48590
|
+
function createReactData25() {
|
|
48387
48591
|
return {};
|
|
48388
48592
|
}
|
|
48389
|
-
function
|
|
48593
|
+
function createInternalData24() {
|
|
48390
48594
|
return {};
|
|
48391
48595
|
}
|
|
48392
48596
|
var transfer_default = defineVxeComponent({
|
|
@@ -48402,10 +48606,10 @@ var transfer_default = defineVxeComponent({
|
|
|
48402
48606
|
emits: [],
|
|
48403
48607
|
setup(props, context) {
|
|
48404
48608
|
const { emit, slots } = context;
|
|
48405
|
-
const xID =
|
|
48609
|
+
const xID = XEUtils110.uniqueId();
|
|
48406
48610
|
const refElem = ref78();
|
|
48407
|
-
const reactData =
|
|
48408
|
-
const internalData =
|
|
48611
|
+
const reactData = reactive83(createReactData25());
|
|
48612
|
+
const internalData = createInternalData24();
|
|
48409
48613
|
const refMaps = {
|
|
48410
48614
|
refElem
|
|
48411
48615
|
};
|
|
@@ -48420,7 +48624,7 @@ var transfer_default = defineVxeComponent({
|
|
|
48420
48624
|
getComputeMaps: () => computeMaps
|
|
48421
48625
|
};
|
|
48422
48626
|
const dispatchEvent = (type, params, evnt) => {
|
|
48423
|
-
emit(type,
|
|
48627
|
+
emit(type, createEvent80(evnt, { $transfer: $xeTransfer }, params));
|
|
48424
48628
|
};
|
|
48425
48629
|
const transferMethods = {
|
|
48426
48630
|
dispatchEvent
|
|
@@ -48471,9 +48675,9 @@ var transfer_default = defineVxeComponent({
|
|
|
48471
48675
|
]
|
|
48472
48676
|
);
|
|
48473
48677
|
};
|
|
48474
|
-
|
|
48475
|
-
|
|
48476
|
-
|
|
48678
|
+
onBeforeUnmount22(() => {
|
|
48679
|
+
XEUtils110.assign(reactData, createReactData25());
|
|
48680
|
+
XEUtils110.assign(internalData, createInternalData24());
|
|
48477
48681
|
});
|
|
48478
48682
|
$xeTransfer.renderVN = renderVN;
|
|
48479
48683
|
return $xeTransfer;
|
|
@@ -48490,16 +48694,16 @@ var VxeTransfer = Object.assign({}, transfer_default, {
|
|
|
48490
48694
|
}
|
|
48491
48695
|
});
|
|
48492
48696
|
dynamicApp.use(VxeTransfer);
|
|
48493
|
-
|
|
48697
|
+
VxeUI183.component(transfer_default);
|
|
48494
48698
|
var Transfer = VxeTransfer;
|
|
48495
48699
|
var transfer_default2 = VxeTransfer;
|
|
48496
48700
|
|
|
48497
48701
|
// packages_temp/tree/index.ts
|
|
48498
|
-
import { VxeUI as
|
|
48702
|
+
import { VxeUI as VxeUI185 } from "@vxe-ui/core";
|
|
48499
48703
|
|
|
48500
48704
|
// packages_temp/tree/src/tree.ts
|
|
48501
|
-
import { ref as ref79, h as h93, reactive as
|
|
48502
|
-
import { VxeUI as
|
|
48705
|
+
import { ref as ref79, h as h93, reactive as reactive85, computed as computed61, watch as watch49, onBeforeUnmount as onBeforeUnmount23, nextTick as nextTick34, onMounted as onMounted53, provide as provide32 } from "vue";
|
|
48706
|
+
import { VxeUI as VxeUI184 } from "@vxe-ui/core";
|
|
48503
48707
|
|
|
48504
48708
|
// packages_temp/tree/src/util.ts
|
|
48505
48709
|
function countTreeExpand($xeTree, prevNode) {
|
|
@@ -48551,8 +48755,8 @@ function getItemCacheObj2(item) {
|
|
|
48551
48755
|
}
|
|
48552
48756
|
|
|
48553
48757
|
// packages_temp/tree/src/store.ts
|
|
48554
|
-
import { reactive as
|
|
48555
|
-
var crossTreeDragNodeInfo =
|
|
48758
|
+
import { reactive as reactive84 } from "vue";
|
|
48759
|
+
var crossTreeDragNodeInfo = reactive84({
|
|
48556
48760
|
node: null
|
|
48557
48761
|
});
|
|
48558
48762
|
function getCrossTreeDragNodeInfo() {
|
|
@@ -48560,14 +48764,14 @@ function getCrossTreeDragNodeInfo() {
|
|
|
48560
48764
|
}
|
|
48561
48765
|
|
|
48562
48766
|
// packages_temp/tree/src/tree.ts
|
|
48563
|
-
import
|
|
48767
|
+
import XEUtils111 from "xe-utils";
|
|
48564
48768
|
var { warnLog: warnLog18, errLog: errLog21 } = createComponentLog("tree");
|
|
48565
|
-
var { menus: menus4, getConfig: getConfig72, getI18n: getI18n26, getIcon: getIcon35, baseUtils: baseUtils6, domUtils: domUtils4, createEvent:
|
|
48769
|
+
var { menus: menus4, getConfig: getConfig72, getI18n: getI18n26, getIcon: getIcon35, baseUtils: baseUtils6, domUtils: domUtils4, createEvent: createEvent81, useFns: useFns61, globalEvents: globalEvents25, globalResize: globalResize5, renderEmptyElement: renderEmptyElement58 } = VxeUI184;
|
|
48566
48770
|
var { getDefVal: getDefVal6 } = baseUtils6;
|
|
48567
48771
|
function getNodeUniqueId2() {
|
|
48568
|
-
return
|
|
48772
|
+
return XEUtils111.uniqueId("node_");
|
|
48569
48773
|
}
|
|
48570
|
-
function
|
|
48774
|
+
function createReactData26() {
|
|
48571
48775
|
return {
|
|
48572
48776
|
parentHeight: 0,
|
|
48573
48777
|
customHeight: 0,
|
|
@@ -48595,7 +48799,7 @@ function createReactData25() {
|
|
|
48595
48799
|
}
|
|
48596
48800
|
};
|
|
48597
48801
|
}
|
|
48598
|
-
function
|
|
48802
|
+
function createInternalData25() {
|
|
48599
48803
|
return {
|
|
48600
48804
|
// initialized: false,
|
|
48601
48805
|
// lastFilterValue: '',
|
|
@@ -48792,7 +48996,7 @@ var tree_default = defineVxeComponent({
|
|
|
48792
48996
|
],
|
|
48793
48997
|
setup(props, context) {
|
|
48794
48998
|
const { emit, slots } = context;
|
|
48795
|
-
const xID =
|
|
48999
|
+
const xID = XEUtils111.uniqueId();
|
|
48796
49000
|
const refElem = ref79();
|
|
48797
49001
|
const refHeaderWrapperElem = ref79();
|
|
48798
49002
|
const refFooterWrapperElem = ref79();
|
|
@@ -48803,76 +49007,76 @@ var tree_default = defineVxeComponent({
|
|
|
48803
49007
|
const refDragTipElem = ref79();
|
|
48804
49008
|
const refTooltip2 = ref79();
|
|
48805
49009
|
const crossTreeDragNodeInfo2 = getCrossTreeDragNodeInfo();
|
|
48806
|
-
const internalData =
|
|
48807
|
-
const reactData =
|
|
48808
|
-
const { computeSize } =
|
|
48809
|
-
const { computeIsVScrollbar } =
|
|
49010
|
+
const internalData = createInternalData25();
|
|
49011
|
+
const reactData = reactive85(createReactData26());
|
|
49012
|
+
const { computeSize } = useFns61.useSize(props);
|
|
49013
|
+
const { computeIsVScrollbar } = useFns61.useVScrollbar(props);
|
|
48810
49014
|
const refMaps = {
|
|
48811
49015
|
refElem
|
|
48812
49016
|
};
|
|
48813
|
-
const computeTitleField =
|
|
49017
|
+
const computeTitleField = computed61(() => {
|
|
48814
49018
|
return props.titleField || "title";
|
|
48815
49019
|
});
|
|
48816
|
-
const computeKeyField =
|
|
49020
|
+
const computeKeyField = computed61(() => {
|
|
48817
49021
|
return props.keyField || "id";
|
|
48818
49022
|
});
|
|
48819
|
-
const computeValueField =
|
|
49023
|
+
const computeValueField = computed61(() => {
|
|
48820
49024
|
const keyField = computeKeyField.value;
|
|
48821
49025
|
return props.valueField || keyField;
|
|
48822
49026
|
});
|
|
48823
|
-
const computeParentField =
|
|
49027
|
+
const computeParentField = computed61(() => {
|
|
48824
49028
|
return props.parentField || "parentId";
|
|
48825
49029
|
});
|
|
48826
|
-
const computeChildrenField =
|
|
49030
|
+
const computeChildrenField = computed61(() => {
|
|
48827
49031
|
return props.childrenField || "children";
|
|
48828
49032
|
});
|
|
48829
|
-
const computeMapChildrenField =
|
|
49033
|
+
const computeMapChildrenField = computed61(() => {
|
|
48830
49034
|
return props.mapChildrenField || "mapChildren";
|
|
48831
49035
|
});
|
|
48832
|
-
const computeHasChildField =
|
|
49036
|
+
const computeHasChildField = computed61(() => {
|
|
48833
49037
|
return props.hasChildField || "hasChild";
|
|
48834
49038
|
});
|
|
48835
|
-
const computeVirtualYOpts =
|
|
49039
|
+
const computeVirtualYOpts = computed61(() => {
|
|
48836
49040
|
return Object.assign({}, getConfig72().tree.virtualYConfig, props.virtualYConfig);
|
|
48837
49041
|
});
|
|
48838
|
-
const computeIsNodeCurrent =
|
|
49042
|
+
const computeIsNodeCurrent = computed61(() => {
|
|
48839
49043
|
const nodeOpts = computeNodeOpts.value;
|
|
48840
49044
|
const { isCurrent } = nodeOpts;
|
|
48841
|
-
if (
|
|
49045
|
+
if (XEUtils111.isBoolean(isCurrent)) {
|
|
48842
49046
|
return isCurrent;
|
|
48843
49047
|
}
|
|
48844
49048
|
return props.isCurrent;
|
|
48845
49049
|
});
|
|
48846
|
-
const computeIsNodeHover =
|
|
49050
|
+
const computeIsNodeHover = computed61(() => {
|
|
48847
49051
|
const nodeOpts = computeNodeOpts.value;
|
|
48848
49052
|
const { isHover } = nodeOpts;
|
|
48849
|
-
if (
|
|
49053
|
+
if (XEUtils111.isBoolean(isHover)) {
|
|
48850
49054
|
return isHover;
|
|
48851
49055
|
}
|
|
48852
49056
|
return props.isHover;
|
|
48853
49057
|
});
|
|
48854
|
-
const computeRadioOpts =
|
|
49058
|
+
const computeRadioOpts = computed61(() => {
|
|
48855
49059
|
return Object.assign({ showIcon: true }, getConfig72().tree.radioConfig, props.radioConfig);
|
|
48856
49060
|
});
|
|
48857
|
-
const computeCheckboxOpts =
|
|
49061
|
+
const computeCheckboxOpts = computed61(() => {
|
|
48858
49062
|
return Object.assign({ showIcon: true }, getConfig72().tree.checkboxConfig, props.checkboxConfig);
|
|
48859
49063
|
});
|
|
48860
|
-
const computeNodeOpts =
|
|
49064
|
+
const computeNodeOpts = computed61(() => {
|
|
48861
49065
|
return Object.assign({}, getConfig72().tree.nodeConfig, props.nodeConfig);
|
|
48862
49066
|
});
|
|
48863
|
-
const computeLoadingOpts =
|
|
49067
|
+
const computeLoadingOpts = computed61(() => {
|
|
48864
49068
|
return Object.assign({}, getConfig72().tree.loadingConfig, props.loadingConfig);
|
|
48865
49069
|
});
|
|
48866
|
-
const computeDragOpts =
|
|
49070
|
+
const computeDragOpts = computed61(() => {
|
|
48867
49071
|
return Object.assign({}, getConfig72().tree.dragConfig, props.dragConfig);
|
|
48868
49072
|
});
|
|
48869
|
-
const computeTooltipOpts =
|
|
49073
|
+
const computeTooltipOpts = computed61(() => {
|
|
48870
49074
|
return Object.assign({}, getConfig72().tree.tooltipConfig, props.tooltipConfig);
|
|
48871
49075
|
});
|
|
48872
|
-
const computeMenuOpts =
|
|
49076
|
+
const computeMenuOpts = computed61(() => {
|
|
48873
49077
|
return Object.assign({}, getConfig72().tree.menuConfig, props.menuConfig);
|
|
48874
49078
|
});
|
|
48875
|
-
const computeWrapperStyles =
|
|
49079
|
+
const computeWrapperStyles = computed61(() => {
|
|
48876
49080
|
const barWidth = computeScrollYWidth.value;
|
|
48877
49081
|
const barHeight = computeScrollXHeight.value;
|
|
48878
49082
|
const stys = {};
|
|
@@ -48882,7 +49086,7 @@ var tree_default = defineVxeComponent({
|
|
|
48882
49086
|
}
|
|
48883
49087
|
return stys;
|
|
48884
49088
|
});
|
|
48885
|
-
const computeTreeStyle =
|
|
49089
|
+
const computeTreeStyle = computed61(() => {
|
|
48886
49090
|
const { indent } = props;
|
|
48887
49091
|
const { customHeight, customMinHeight, customMaxHeight } = reactData;
|
|
48888
49092
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
@@ -48911,53 +49115,53 @@ var tree_default = defineVxeComponent({
|
|
|
48911
49115
|
}
|
|
48912
49116
|
return stys;
|
|
48913
49117
|
});
|
|
48914
|
-
const computeFilterOpts =
|
|
49118
|
+
const computeFilterOpts = computed61(() => {
|
|
48915
49119
|
return Object.assign({}, getConfig72().tree.filterConfig, props.filterConfig);
|
|
48916
49120
|
});
|
|
48917
|
-
const computeScrollbarOpts =
|
|
49121
|
+
const computeScrollbarOpts = computed61(() => {
|
|
48918
49122
|
return Object.assign({}, getConfig72().tree.scrollbarConfig, props.scrollbarConfig);
|
|
48919
49123
|
});
|
|
48920
|
-
const computeScrollbarXOpts =
|
|
49124
|
+
const computeScrollbarXOpts = computed61(() => {
|
|
48921
49125
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48922
49126
|
return Object.assign({}, getConfig72().scrollbar.xConfig, scrollbarOpts.xConfig, {
|
|
48923
49127
|
visible: false
|
|
48924
49128
|
});
|
|
48925
49129
|
});
|
|
48926
|
-
const computeScrollbarYOpts =
|
|
49130
|
+
const computeScrollbarYOpts = computed61(() => {
|
|
48927
49131
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48928
49132
|
return Object.assign({}, getConfig72().scrollbar.yConfig, scrollbarOpts.yConfig);
|
|
48929
49133
|
});
|
|
48930
|
-
const computeScrollXHeight =
|
|
49134
|
+
const computeScrollXHeight = computed61(() => {
|
|
48931
49135
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48932
49136
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
48933
49137
|
return getDefVal6(getDefVal6(scrollbarXOpts.height, scrollbarOpts.height), getConfig72().scrollbar.height);
|
|
48934
49138
|
});
|
|
48935
|
-
const computeScrollYWidth =
|
|
49139
|
+
const computeScrollYWidth = computed61(() => {
|
|
48936
49140
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48937
49141
|
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
48938
49142
|
return getDefVal6(getDefVal6(scrollbarYOpts.width, scrollbarOpts.width), getConfig72().scrollbar.width);
|
|
48939
49143
|
});
|
|
48940
|
-
const computeScrollXVisible =
|
|
49144
|
+
const computeScrollXVisible = computed61(() => {
|
|
48941
49145
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48942
49146
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
48943
49147
|
return getDefVal6(scrollbarXOpts.visible, scrollbarOpts.visible);
|
|
48944
49148
|
});
|
|
48945
|
-
const computeScrollYVisible =
|
|
49149
|
+
const computeScrollYVisible = computed61(() => {
|
|
48946
49150
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48947
49151
|
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
48948
49152
|
return getDefVal6(scrollbarYOpts.visible, scrollbarOpts.visible);
|
|
48949
49153
|
});
|
|
48950
|
-
const computeScrollXAutoHide =
|
|
49154
|
+
const computeScrollXAutoHide = computed61(() => {
|
|
48951
49155
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48952
49156
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
48953
49157
|
return getDefVal6(getDefVal6(scrollbarXOpts.autoHide, scrollbarOpts.autoHide), getConfig72().scrollbar.autoHide);
|
|
48954
49158
|
});
|
|
48955
|
-
const computeScrollYAutoHide =
|
|
49159
|
+
const computeScrollYAutoHide = computed61(() => {
|
|
48956
49160
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48957
49161
|
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
48958
49162
|
return getDefVal6(getDefVal6(scrollbarYOpts.autoHide, scrollbarOpts.autoHide), getConfig72().scrollbar.autoHide);
|
|
48959
49163
|
});
|
|
48960
|
-
const computeScrollbarWrapperClss =
|
|
49164
|
+
const computeScrollbarWrapperClss = computed61(() => {
|
|
48961
49165
|
const { yThumbHeight, xThumbWidth } = reactData;
|
|
48962
49166
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48963
49167
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
@@ -48979,11 +49183,11 @@ var tree_default = defineVxeComponent({
|
|
|
48979
49183
|
}
|
|
48980
49184
|
);
|
|
48981
49185
|
});
|
|
48982
|
-
const computeScrollbarXToTop =
|
|
49186
|
+
const computeScrollbarXToTop = computed61(() => {
|
|
48983
49187
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
48984
49188
|
return scrollbarXOpts.position === "top";
|
|
48985
49189
|
});
|
|
48986
|
-
const computeScrollbarYToLeft =
|
|
49190
|
+
const computeScrollbarYToLeft = computed61(() => {
|
|
48987
49191
|
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
48988
49192
|
return scrollbarYOpts.position === "left";
|
|
48989
49193
|
});
|
|
@@ -49006,13 +49210,13 @@ var tree_default = defineVxeComponent({
|
|
|
49006
49210
|
getRefMaps: () => refMaps,
|
|
49007
49211
|
getComputeMaps: () => computeMaps
|
|
49008
49212
|
};
|
|
49009
|
-
const { refTrackXElem, refTrackYElem, refThumbXElem, refThumbYElem, updateThumbSize, updateThumbOffset, clickTrackXEvent, clickTrackYEvent, pointerdownThumbXEvent, pointermoveThumbXEvent, cleatPointerThumbEvent, pointerdownThumbYEvent, pointermoveThumbYEvent } =
|
|
49213
|
+
const { refTrackXElem, refTrackYElem, refThumbXElem, refThumbYElem, updateThumbSize, updateThumbOffset, clickTrackXEvent, clickTrackYEvent, pointerdownThumbXEvent, pointermoveThumbXEvent, cleatPointerThumbEvent, pointerdownThumbYEvent, pointermoveThumbYEvent } = useFns61.useInitVScrollbar($xeTree);
|
|
49010
49214
|
const getNodeId = (node) => {
|
|
49011
49215
|
if (!node) {
|
|
49012
49216
|
return "";
|
|
49013
49217
|
}
|
|
49014
49218
|
const valueField = computeValueField.value;
|
|
49015
|
-
const nodeKey =
|
|
49219
|
+
const nodeKey = XEUtils111.get(node, valueField);
|
|
49016
49220
|
return enModelValue(nodeKey);
|
|
49017
49221
|
};
|
|
49018
49222
|
const isExpandByNode = (node) => {
|
|
@@ -49053,7 +49257,7 @@ var tree_default = defineVxeComponent({
|
|
|
49053
49257
|
const handleSetCheckboxByNodeId = (nodeKeys, checked) => {
|
|
49054
49258
|
const { nodeMaps } = internalData;
|
|
49055
49259
|
if (nodeKeys) {
|
|
49056
|
-
if (!
|
|
49260
|
+
if (!XEUtils111.isArray(nodeKeys)) {
|
|
49057
49261
|
nodeKeys = [nodeKeys];
|
|
49058
49262
|
}
|
|
49059
49263
|
const nodeList = [];
|
|
@@ -49090,7 +49294,7 @@ var tree_default = defineVxeComponent({
|
|
|
49090
49294
|
if (checkStrictly) {
|
|
49091
49295
|
nodeList.forEach(handleSelect);
|
|
49092
49296
|
} else {
|
|
49093
|
-
|
|
49297
|
+
XEUtils111.eachTree(nodeList, handleSelect, { children: transform ? mapChildrenField : childrenField });
|
|
49094
49298
|
}
|
|
49095
49299
|
reactData.updateCheckboxFlag++;
|
|
49096
49300
|
updateCheckboxStatus();
|
|
@@ -49111,7 +49315,7 @@ var tree_default = defineVxeComponent({
|
|
|
49111
49315
|
}
|
|
49112
49316
|
};
|
|
49113
49317
|
const dispatchEvent = (type, params, evnt) => {
|
|
49114
|
-
emit(type,
|
|
49318
|
+
emit(type, createEvent81(evnt, { $tree: $xeTree }, params));
|
|
49115
49319
|
};
|
|
49116
49320
|
const getParentElem = () => {
|
|
49117
49321
|
const el = refElem.value;
|
|
@@ -49126,9 +49330,9 @@ var tree_default = defineVxeComponent({
|
|
|
49126
49330
|
num = parentHeight;
|
|
49127
49331
|
} else {
|
|
49128
49332
|
if (isScale(val)) {
|
|
49129
|
-
num = Math.floor((
|
|
49333
|
+
num = Math.floor((XEUtils111.toInteger(val) || 1) / 100 * parentHeight);
|
|
49130
49334
|
} else {
|
|
49131
|
-
num =
|
|
49335
|
+
num = XEUtils111.toNumber(val);
|
|
49132
49336
|
}
|
|
49133
49337
|
num = Math.max(40, num);
|
|
49134
49338
|
}
|
|
@@ -49151,7 +49355,7 @@ var tree_default = defineVxeComponent({
|
|
|
49151
49355
|
let nodeid = getNodeId(item);
|
|
49152
49356
|
if (!nodeid) {
|
|
49153
49357
|
nodeid = getNodeUniqueId2();
|
|
49154
|
-
|
|
49358
|
+
XEUtils111.set(item, valueField, nodeid);
|
|
49155
49359
|
}
|
|
49156
49360
|
return item;
|
|
49157
49361
|
})
|
|
@@ -49162,13 +49366,13 @@ var tree_default = defineVxeComponent({
|
|
|
49162
49366
|
const valueField = computeValueField.value;
|
|
49163
49367
|
const childrenField = computeChildrenField.value;
|
|
49164
49368
|
const keyMaps = {};
|
|
49165
|
-
|
|
49369
|
+
XEUtils111.eachTree(
|
|
49166
49370
|
treeFullData,
|
|
49167
49371
|
(item, index, items, path, parenItem, nodes) => {
|
|
49168
49372
|
let nodeid = getNodeId(item);
|
|
49169
49373
|
if (!nodeid) {
|
|
49170
49374
|
nodeid = getNodeUniqueId2();
|
|
49171
|
-
|
|
49375
|
+
XEUtils111.set(item, valueField, nodeid);
|
|
49172
49376
|
}
|
|
49173
49377
|
keyMaps[nodeid] = {
|
|
49174
49378
|
item,
|
|
@@ -49194,7 +49398,7 @@ var tree_default = defineVxeComponent({
|
|
|
49194
49398
|
const childrenField = computeChildrenField.value;
|
|
49195
49399
|
const mapChildrenField = computeMapChildrenField.value;
|
|
49196
49400
|
let vtIndex = 0;
|
|
49197
|
-
|
|
49401
|
+
XEUtils111.eachTree(
|
|
49198
49402
|
afterTreeList,
|
|
49199
49403
|
(item, index, items, path, parenItem, nodes) => {
|
|
49200
49404
|
const nodeid = getNodeId(item);
|
|
@@ -49251,7 +49455,7 @@ var tree_default = defineVxeComponent({
|
|
|
49251
49455
|
beforeFilterMethod(bafParams);
|
|
49252
49456
|
}
|
|
49253
49457
|
if (transform) {
|
|
49254
|
-
treeList =
|
|
49458
|
+
treeList = XEUtils111.searchTree(treeFullData, handleSearch, {
|
|
49255
49459
|
original: true,
|
|
49256
49460
|
isEvery: true,
|
|
49257
49461
|
children: childrenField,
|
|
@@ -49277,7 +49481,7 @@ var tree_default = defineVxeComponent({
|
|
|
49277
49481
|
});
|
|
49278
49482
|
} else {
|
|
49279
49483
|
if (transform) {
|
|
49280
|
-
treeList =
|
|
49484
|
+
treeList = XEUtils111.searchTree(treeFullData, () => true, {
|
|
49281
49485
|
original: true,
|
|
49282
49486
|
isEvery: true,
|
|
49283
49487
|
children: childrenField,
|
|
@@ -49317,7 +49521,7 @@ var tree_default = defineVxeComponent({
|
|
|
49317
49521
|
const expandMaps = {};
|
|
49318
49522
|
if (transform) {
|
|
49319
49523
|
const fullData = [];
|
|
49320
|
-
|
|
49524
|
+
XEUtils111.eachTree(
|
|
49321
49525
|
afterTreeList,
|
|
49322
49526
|
(item, index, items, path, parentNode) => {
|
|
49323
49527
|
const nodeid = getNodeId(item);
|
|
@@ -49353,14 +49557,14 @@ var tree_default = defineVxeComponent({
|
|
|
49353
49557
|
});
|
|
49354
49558
|
reactData.treeList = treeList;
|
|
49355
49559
|
};
|
|
49356
|
-
const triggerSearchEvent =
|
|
49560
|
+
const triggerSearchEvent = XEUtils111.debounce(() => handleData(true), 350, { trailing: true });
|
|
49357
49561
|
const loadData = (list) => {
|
|
49358
49562
|
const { expandAll, expandNodeKeys, transform, rootParentValue, rootValues } = props;
|
|
49359
49563
|
const { initialized, scrollYStore } = internalData;
|
|
49360
49564
|
const keyField = computeKeyField.value;
|
|
49361
49565
|
const parentField = computeParentField.value;
|
|
49362
49566
|
const childrenField = computeChildrenField.value;
|
|
49363
|
-
const fullData = transform ?
|
|
49567
|
+
const fullData = transform ? XEUtils111.toArrayTree(list, {
|
|
49364
49568
|
key: keyField,
|
|
49365
49569
|
parentKey: parentField,
|
|
49366
49570
|
mapChildren: childrenField,
|
|
@@ -49440,7 +49644,7 @@ var tree_default = defineVxeComponent({
|
|
|
49440
49644
|
if (scrollYLoad) {
|
|
49441
49645
|
const scrollBodyElem = refVirtualWrapper.value;
|
|
49442
49646
|
const visibleYSize = Math.max(8, scrollBodyElem ? Math.ceil(scrollBodyElem.clientHeight / rowHeight) : 0);
|
|
49443
|
-
const offsetYSize = Math.max(0, Math.min(2,
|
|
49647
|
+
const offsetYSize = Math.max(0, Math.min(2, XEUtils111.toNumber(virtualYOpts.oSize)));
|
|
49444
49648
|
scrollYStore.offsetSize = offsetYSize;
|
|
49445
49649
|
scrollYStore.visibleSize = visibleYSize;
|
|
49446
49650
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex, visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
@@ -49453,16 +49657,16 @@ var tree_default = defineVxeComponent({
|
|
|
49453
49657
|
const handleScrollTo = (scrollLeft, scrollTop) => {
|
|
49454
49658
|
const scrollBodyElem = refVirtualWrapper.value;
|
|
49455
49659
|
if (scrollLeft) {
|
|
49456
|
-
if (!
|
|
49660
|
+
if (!XEUtils111.isNumber(scrollLeft)) {
|
|
49457
49661
|
scrollTop = scrollLeft.top;
|
|
49458
49662
|
scrollLeft = scrollLeft.left;
|
|
49459
49663
|
}
|
|
49460
49664
|
}
|
|
49461
49665
|
if (scrollBodyElem) {
|
|
49462
|
-
if (
|
|
49666
|
+
if (XEUtils111.isNumber(scrollLeft)) {
|
|
49463
49667
|
scrollBodyElem.scrollLeft = scrollLeft;
|
|
49464
49668
|
}
|
|
49465
|
-
if (
|
|
49669
|
+
if (XEUtils111.isNumber(scrollTop)) {
|
|
49466
49670
|
scrollBodyElem.scrollTop = scrollTop;
|
|
49467
49671
|
}
|
|
49468
49672
|
}
|
|
@@ -49641,7 +49845,7 @@ var tree_default = defineVxeComponent({
|
|
|
49641
49845
|
if (!tipOverEl) {
|
|
49642
49846
|
return;
|
|
49643
49847
|
}
|
|
49644
|
-
const cellText =
|
|
49848
|
+
const cellText = XEUtils111.toString(tipOverEl.textContent).trim();
|
|
49645
49849
|
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
|
|
49646
49850
|
let isShow = false;
|
|
49647
49851
|
let customContent = null;
|
|
@@ -49650,7 +49854,7 @@ var tree_default = defineVxeComponent({
|
|
|
49650
49854
|
customContent = contentMethod({ node, $event: evnt, $tree: $xeTree });
|
|
49651
49855
|
}
|
|
49652
49856
|
if (showAll) {
|
|
49653
|
-
if (
|
|
49857
|
+
if (XEUtils111.eqNull(customContent)) {
|
|
49654
49858
|
isShow = true;
|
|
49655
49859
|
content = cellText;
|
|
49656
49860
|
} else if (customContent !== "" && customContent !== false) {
|
|
@@ -49658,7 +49862,7 @@ var tree_default = defineVxeComponent({
|
|
|
49658
49862
|
content = "" + customContent;
|
|
49659
49863
|
}
|
|
49660
49864
|
} else {
|
|
49661
|
-
if (
|
|
49865
|
+
if (XEUtils111.eqNull(customContent)) {
|
|
49662
49866
|
isShow = isOver;
|
|
49663
49867
|
content = cellText;
|
|
49664
49868
|
} else if (customContent !== "" && customContent !== false) {
|
|
@@ -49719,8 +49923,8 @@ var tree_default = defineVxeComponent({
|
|
|
49719
49923
|
} else if (reactData.currentNode) {
|
|
49720
49924
|
reactData.currentNode = null;
|
|
49721
49925
|
}
|
|
49722
|
-
if (
|
|
49723
|
-
|
|
49926
|
+
if (VxeUI184.contextMenu) {
|
|
49927
|
+
VxeUI184.contextMenu.openByEvent(evnt, {
|
|
49724
49928
|
options,
|
|
49725
49929
|
events: {
|
|
49726
49930
|
optionClick(eventParams) {
|
|
@@ -49767,7 +49971,7 @@ var tree_default = defineVxeComponent({
|
|
|
49767
49971
|
if (treeExpandLazyLoadedMaps[nodeid]) {
|
|
49768
49972
|
treeExpandLazyLoadedMaps[nodeid] = false;
|
|
49769
49973
|
}
|
|
49770
|
-
if (!
|
|
49974
|
+
if (!XEUtils111.isArray(childRecords)) {
|
|
49771
49975
|
childRecords = [];
|
|
49772
49976
|
}
|
|
49773
49977
|
if (childRecords) {
|
|
@@ -49881,7 +50085,7 @@ var tree_default = defineVxeComponent({
|
|
|
49881
50085
|
if (!checkStrictly) {
|
|
49882
50086
|
const childNodeMaps = {};
|
|
49883
50087
|
const childNodeList = [];
|
|
49884
|
-
|
|
50088
|
+
XEUtils111.eachTree(
|
|
49885
50089
|
afterTreeList,
|
|
49886
50090
|
(node) => {
|
|
49887
50091
|
const nodeid = getNodeId(node);
|
|
@@ -49978,7 +50182,7 @@ var tree_default = defineVxeComponent({
|
|
|
49978
50182
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
49979
50183
|
const { checkStrictly, checkMode, checkMethod } = checkboxOpts;
|
|
49980
50184
|
const nodeid = getNodeId(node);
|
|
49981
|
-
const childList =
|
|
50185
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
49982
50186
|
const isExistChild = childList && childList.length > 0;
|
|
49983
50187
|
const nodeItem = nodeMaps[nodeid] || {};
|
|
49984
50188
|
const nLevel = nodeItem.level;
|
|
@@ -49994,8 +50198,8 @@ var tree_default = defineVxeComponent({
|
|
|
49994
50198
|
selectCheckboxMaps[nodeid] = node;
|
|
49995
50199
|
}
|
|
49996
50200
|
if (!checkStrictly) {
|
|
49997
|
-
|
|
49998
|
-
|
|
50201
|
+
XEUtils111.eachTree(
|
|
50202
|
+
XEUtils111.get(node, transform ? mapChildrenField : childrenField),
|
|
49999
50203
|
(childNode) => {
|
|
50000
50204
|
const childNodeid = getNodeId(childNode);
|
|
50001
50205
|
if (isChecked) {
|
|
@@ -50013,7 +50217,7 @@ var tree_default = defineVxeComponent({
|
|
|
50013
50217
|
}
|
|
50014
50218
|
reactData.updateCheckboxFlag++;
|
|
50015
50219
|
updateCheckboxStatus();
|
|
50016
|
-
const nodeids =
|
|
50220
|
+
const nodeids = XEUtils111.keys(selectCheckboxMaps);
|
|
50017
50221
|
const value = nodeids.map(deModelValue);
|
|
50018
50222
|
emitCheckboxMode(value);
|
|
50019
50223
|
dispatchEvent("checkbox-change", { node, value, checked: isChecked }, evnt);
|
|
@@ -50023,7 +50227,7 @@ var tree_default = defineVxeComponent({
|
|
|
50023
50227
|
const nodeOpts = computeNodeOpts.value;
|
|
50024
50228
|
const { currentMethod, trigger } = nodeOpts;
|
|
50025
50229
|
const childrenField = computeChildrenField.value;
|
|
50026
|
-
const childList =
|
|
50230
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
50027
50231
|
const hasChild = childList && childList.length;
|
|
50028
50232
|
let isDisabled = !!currentMethod;
|
|
50029
50233
|
if (trigger === "child") {
|
|
@@ -50053,7 +50257,7 @@ var tree_default = defineVxeComponent({
|
|
|
50053
50257
|
const childrenField = computeChildrenField.value;
|
|
50054
50258
|
const { checkMode, checkMethod } = radioOpts;
|
|
50055
50259
|
const nodeid = getNodeId(node);
|
|
50056
|
-
const childList =
|
|
50260
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
50057
50261
|
const isExistChild = childList && childList.length > 0;
|
|
50058
50262
|
const nodeItem = nodeMaps[nodeid] || {};
|
|
50059
50263
|
const nLevel = nodeItem.level;
|
|
@@ -50077,7 +50281,7 @@ var tree_default = defineVxeComponent({
|
|
|
50077
50281
|
newRecords.forEach((item) => {
|
|
50078
50282
|
const parentNodeId = item[parentField];
|
|
50079
50283
|
const nodeid = getNodeId(item);
|
|
50080
|
-
const matchObj = parentNodeId ?
|
|
50284
|
+
const matchObj = parentNodeId ? XEUtils111.findTree(treeFullData, (item2) => parentNodeId === item2[keyField], { children: mapChildrenField }) : null;
|
|
50081
50285
|
const itemRest = getItemCacheObj2(item);
|
|
50082
50286
|
if (matchObj) {
|
|
50083
50287
|
const { item: parentItem } = matchObj;
|
|
@@ -50085,10 +50289,10 @@ var tree_default = defineVxeComponent({
|
|
|
50085
50289
|
const parentLevel = parentRest ? parentRest.level : 0;
|
|
50086
50290
|
let pChilds = parentItem[childrenField];
|
|
50087
50291
|
let pMapChilds = parentItem[mapChildrenField];
|
|
50088
|
-
if (!
|
|
50292
|
+
if (!XEUtils111.isArray(pChilds)) {
|
|
50089
50293
|
pChilds = parentItem[childrenField] = [];
|
|
50090
50294
|
}
|
|
50091
|
-
if (!
|
|
50295
|
+
if (!XEUtils111.isArray(pMapChilds)) {
|
|
50092
50296
|
pMapChilds = parentItem[mapChildrenField] = [];
|
|
50093
50297
|
}
|
|
50094
50298
|
itemRest.parent = parentItem;
|
|
@@ -50116,11 +50320,11 @@ var tree_default = defineVxeComponent({
|
|
|
50116
50320
|
errLog21("vxe.error.reqSupportProp", ["insert() | insertAt() | insertNextAt()", "transform"]);
|
|
50117
50321
|
return Promise.resolve({ node: null, nodes: [] });
|
|
50118
50322
|
}
|
|
50119
|
-
if (!
|
|
50323
|
+
if (!XEUtils111.isArray(records)) {
|
|
50120
50324
|
records = [records];
|
|
50121
50325
|
}
|
|
50122
50326
|
let targetNode = targetNodeOrNodeid;
|
|
50123
|
-
if (
|
|
50327
|
+
if (XEUtils111.isString(targetNodeOrNodeid) || XEUtils111.isNumber(targetNodeOrNodeid)) {
|
|
50124
50328
|
const nodeRest = nodeMaps[targetNodeOrNodeid];
|
|
50125
50329
|
if (nodeRest) {
|
|
50126
50330
|
targetNode = nodeRest.item;
|
|
@@ -50129,15 +50333,15 @@ var tree_default = defineVxeComponent({
|
|
|
50129
50333
|
if (!records.length) {
|
|
50130
50334
|
return Promise.resolve({ node: null, nodes: [] });
|
|
50131
50335
|
}
|
|
50132
|
-
const newRecords = records.map((record) =>
|
|
50133
|
-
const treeRecords =
|
|
50134
|
-
if (
|
|
50336
|
+
const newRecords = records.map((record) => XEUtils111.assign({ [mapChildrenField]: [], [childrenField]: [] }, record));
|
|
50337
|
+
const treeRecords = XEUtils111.toArrayTree(newRecords, { key: keyField, parentKey: parentField, children: childrenField });
|
|
50338
|
+
if (XEUtils111.eqNull(targetNode)) {
|
|
50135
50339
|
insertTreeNode(newRecords, false);
|
|
50136
50340
|
} else {
|
|
50137
50341
|
if (targetNode === -1) {
|
|
50138
50342
|
insertTreeNode(newRecords, true);
|
|
50139
50343
|
} else {
|
|
50140
|
-
const matchMapObj =
|
|
50344
|
+
const matchMapObj = XEUtils111.findTree(treeFullData, (item) => targetNode[keyField] === item[keyField], { children: mapChildrenField });
|
|
50141
50345
|
if (matchMapObj) {
|
|
50142
50346
|
const { parent: parentNode } = matchMapObj;
|
|
50143
50347
|
const parentMapChilds = parentNode ? parentNode[mapChildrenField] : treeFullData;
|
|
@@ -50151,7 +50355,7 @@ var tree_default = defineVxeComponent({
|
|
|
50151
50355
|
}
|
|
50152
50356
|
} else {
|
|
50153
50357
|
if (item[parentField] !== null) {
|
|
50154
|
-
if (!
|
|
50358
|
+
if (!XEUtils111.eqNull(item[parentField])) {
|
|
50155
50359
|
errLog21("vxe.error.errProp", [`${parentField}=${item[parentField]}`, "null"]);
|
|
50156
50360
|
}
|
|
50157
50361
|
item[parentField] = null;
|
|
@@ -50163,7 +50367,7 @@ var tree_default = defineVxeComponent({
|
|
|
50163
50367
|
}
|
|
50164
50368
|
parentMapChilds.splice(targetIndex, 0, item);
|
|
50165
50369
|
});
|
|
50166
|
-
|
|
50370
|
+
XEUtils111.eachTree(
|
|
50167
50371
|
treeRecords,
|
|
50168
50372
|
(item) => {
|
|
50169
50373
|
const nodeid = getNodeId(item);
|
|
@@ -50177,7 +50381,7 @@ var tree_default = defineVxeComponent({
|
|
|
50177
50381
|
{ children: childrenField }
|
|
50178
50382
|
);
|
|
50179
50383
|
if (parentNode) {
|
|
50180
|
-
const matchObj =
|
|
50384
|
+
const matchObj = XEUtils111.findTree(treeFullData, (item) => targetNode[keyField] === item[keyField], { children: childrenField });
|
|
50181
50385
|
if (matchObj) {
|
|
50182
50386
|
const parentChilds = matchObj.items;
|
|
50183
50387
|
let targetIndex = matchObj.index;
|
|
@@ -50204,7 +50408,7 @@ var tree_default = defineVxeComponent({
|
|
|
50204
50408
|
insertNodeMaps[nodeid] = newItem;
|
|
50205
50409
|
}
|
|
50206
50410
|
};
|
|
50207
|
-
|
|
50411
|
+
XEUtils111.eachTree(treeRecords, handleStatus, { children: mapChildrenField });
|
|
50208
50412
|
reactData.removeNodeFlag++;
|
|
50209
50413
|
reactData.insertNodeFlag++;
|
|
50210
50414
|
cacheNodeMap();
|
|
@@ -50230,11 +50434,11 @@ var tree_default = defineVxeComponent({
|
|
|
50230
50434
|
errLog21("vxe.error.reqSupportProp", ["insertChild() | insertChildAt() | insertChildNextAt()", "transform"]);
|
|
50231
50435
|
return Promise.resolve({ node: null, nodes: [] });
|
|
50232
50436
|
}
|
|
50233
|
-
if (!
|
|
50437
|
+
if (!XEUtils111.isArray(records)) {
|
|
50234
50438
|
records = [records];
|
|
50235
50439
|
}
|
|
50236
50440
|
let parentNode = parentNodeOrParentId;
|
|
50237
|
-
if (
|
|
50441
|
+
if (XEUtils111.isString(parentNodeOrParentId) || XEUtils111.isNumber(parentNodeOrParentId)) {
|
|
50238
50442
|
const nodeRest = nodeMaps[parentNodeOrParentId];
|
|
50239
50443
|
if (nodeRest) {
|
|
50240
50444
|
parentNode = nodeRest.item;
|
|
@@ -50337,7 +50541,7 @@ var tree_default = defineVxeComponent({
|
|
|
50337
50541
|
},
|
|
50338
50542
|
setCheckboxNode(nodeList, checked) {
|
|
50339
50543
|
if (nodeList) {
|
|
50340
|
-
if (!
|
|
50544
|
+
if (!XEUtils111.isArray(nodeList)) {
|
|
50341
50545
|
nodeList = [nodeList];
|
|
50342
50546
|
}
|
|
50343
50547
|
handleCheckedCheckboxNode(nodeList, checked);
|
|
@@ -50353,7 +50557,7 @@ var tree_default = defineVxeComponent({
|
|
|
50353
50557
|
getCheckboxNodeIds() {
|
|
50354
50558
|
const { selectCheckboxMaps } = internalData;
|
|
50355
50559
|
const nodeKeys = [];
|
|
50356
|
-
|
|
50560
|
+
XEUtils111.each(selectCheckboxMaps, (item, nodeId) => {
|
|
50357
50561
|
nodeKeys.push(deModelValue(nodeId));
|
|
50358
50562
|
});
|
|
50359
50563
|
return nodeKeys;
|
|
@@ -50364,7 +50568,7 @@ var tree_default = defineVxeComponent({
|
|
|
50364
50568
|
getCheckboxRecords() {
|
|
50365
50569
|
const { nodeMaps, selectCheckboxMaps } = internalData;
|
|
50366
50570
|
const list = [];
|
|
50367
|
-
|
|
50571
|
+
XEUtils111.each(selectCheckboxMaps, (item, nodeid) => {
|
|
50368
50572
|
const nodeItem = nodeMaps[nodeid];
|
|
50369
50573
|
if (nodeItem) {
|
|
50370
50574
|
list.push(nodeItem.item);
|
|
@@ -50391,7 +50595,7 @@ var tree_default = defineVxeComponent({
|
|
|
50391
50595
|
const checkKeys = [];
|
|
50392
50596
|
const checkNodes = [];
|
|
50393
50597
|
if (checked) {
|
|
50394
|
-
|
|
50598
|
+
XEUtils111.eachTree(
|
|
50395
50599
|
transform ? afterTreeList : afterVisibleList,
|
|
50396
50600
|
(node) => {
|
|
50397
50601
|
const nodeid = getNodeId(node);
|
|
@@ -50416,7 +50620,7 @@ var tree_default = defineVxeComponent({
|
|
|
50416
50620
|
clearAllExpandNode() {
|
|
50417
50621
|
const { scrollYLoad } = reactData;
|
|
50418
50622
|
const { nodeMaps, scrollYStore } = internalData;
|
|
50419
|
-
|
|
50623
|
+
XEUtils111.each(nodeMaps, (nodeItem) => {
|
|
50420
50624
|
nodeItem.treeLoaded = false;
|
|
50421
50625
|
});
|
|
50422
50626
|
internalData.treeExpandedMaps = {};
|
|
@@ -50436,7 +50640,7 @@ var tree_default = defineVxeComponent({
|
|
|
50436
50640
|
setExpandByNodeId(nodeKeys, expanded) {
|
|
50437
50641
|
const { treeExpandedMaps } = internalData;
|
|
50438
50642
|
if (nodeKeys) {
|
|
50439
|
-
if (!
|
|
50643
|
+
if (!XEUtils111.isArray(nodeKeys)) {
|
|
50440
50644
|
nodeKeys = [nodeKeys];
|
|
50441
50645
|
}
|
|
50442
50646
|
nodeKeys.forEach((nodeKey) => {
|
|
@@ -50452,7 +50656,7 @@ var tree_default = defineVxeComponent({
|
|
|
50452
50656
|
getExpandNodeIds() {
|
|
50453
50657
|
const { treeExpandedMaps } = internalData;
|
|
50454
50658
|
const nodeKeys = [];
|
|
50455
|
-
|
|
50659
|
+
XEUtils111.each(treeExpandedMaps, (item, nodeId) => {
|
|
50456
50660
|
nodeKeys.push(deModelValue(nodeId));
|
|
50457
50661
|
});
|
|
50458
50662
|
return nodeKeys;
|
|
@@ -50460,7 +50664,7 @@ var tree_default = defineVxeComponent({
|
|
|
50460
50664
|
getExpandNodes() {
|
|
50461
50665
|
const { nodeMaps, treeExpandedMaps } = internalData;
|
|
50462
50666
|
const list = [];
|
|
50463
|
-
|
|
50667
|
+
XEUtils111.each(treeExpandedMaps, (item, nodeid) => {
|
|
50464
50668
|
const nodeItem = nodeMaps[nodeid];
|
|
50465
50669
|
if (nodeItem) {
|
|
50466
50670
|
list.push(nodeItem.item);
|
|
@@ -50471,7 +50675,7 @@ var tree_default = defineVxeComponent({
|
|
|
50471
50675
|
setExpandNode(nodes, expanded) {
|
|
50472
50676
|
const { treeExpandedMaps } = internalData;
|
|
50473
50677
|
if (nodes) {
|
|
50474
|
-
if (!
|
|
50678
|
+
if (!XEUtils111.isArray(nodes)) {
|
|
50475
50679
|
nodes = [nodes];
|
|
50476
50680
|
}
|
|
50477
50681
|
nodes.forEach((node) => {
|
|
@@ -50487,7 +50691,7 @@ var tree_default = defineVxeComponent({
|
|
|
50487
50691
|
toggleExpandByNodeId(nodeKeys) {
|
|
50488
50692
|
const { treeExpandedMaps } = internalData;
|
|
50489
50693
|
if (nodeKeys) {
|
|
50490
|
-
if (!
|
|
50694
|
+
if (!XEUtils111.isArray(nodeKeys)) {
|
|
50491
50695
|
nodeKeys = [nodeKeys];
|
|
50492
50696
|
}
|
|
50493
50697
|
nodeKeys.forEach((nodeKey) => {
|
|
@@ -50503,7 +50707,7 @@ var tree_default = defineVxeComponent({
|
|
|
50503
50707
|
toggleExpandNode(nodes) {
|
|
50504
50708
|
const { treeExpandedMaps } = internalData;
|
|
50505
50709
|
if (nodes) {
|
|
50506
|
-
if (!
|
|
50710
|
+
if (!XEUtils111.isArray(nodes)) {
|
|
50507
50711
|
nodes = [nodes];
|
|
50508
50712
|
}
|
|
50509
50713
|
nodes.forEach((node) => {
|
|
@@ -50523,10 +50727,10 @@ var tree_default = defineVxeComponent({
|
|
|
50523
50727
|
const childrenField = computeChildrenField.value;
|
|
50524
50728
|
const mapChildrenField = computeMapChildrenField.value;
|
|
50525
50729
|
if (expanded) {
|
|
50526
|
-
|
|
50730
|
+
XEUtils111.eachTree(
|
|
50527
50731
|
internalData.afterTreeList,
|
|
50528
50732
|
(node) => {
|
|
50529
|
-
const childList =
|
|
50733
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
50530
50734
|
const hasChild = childList && childList.length;
|
|
50531
50735
|
if (hasChild) {
|
|
50532
50736
|
const nodeid = getNodeId(node);
|
|
@@ -50585,7 +50789,7 @@ var tree_default = defineVxeComponent({
|
|
|
50585
50789
|
const parentLevel = parentNodeItem ? parentNodeItem.level : 0;
|
|
50586
50790
|
const parentNodes = parentNodeItem ? parentNodeItem.nodes : [];
|
|
50587
50791
|
return createNode(childRecords).then((nodeList) => {
|
|
50588
|
-
|
|
50792
|
+
XEUtils111.eachTree(
|
|
50589
50793
|
nodeList,
|
|
50590
50794
|
(childNode, index, items, path, parent, nodes) => {
|
|
50591
50795
|
const itemNodeId = getNodeId(childNode);
|
|
@@ -50622,7 +50826,7 @@ var tree_default = defineVxeComponent({
|
|
|
50622
50826
|
getCheckboxIndeterminateNodes() {
|
|
50623
50827
|
const { nodeMaps, indeterminateNodeMaps } = internalData;
|
|
50624
50828
|
const list = [];
|
|
50625
|
-
|
|
50829
|
+
XEUtils111.each(indeterminateNodeMaps, (item, nodeid) => {
|
|
50626
50830
|
const nodeItem = nodeMaps[nodeid];
|
|
50627
50831
|
if (nodeItem) {
|
|
50628
50832
|
list.push(nodeItem.item);
|
|
@@ -50647,10 +50851,10 @@ var tree_default = defineVxeComponent({
|
|
|
50647
50851
|
const scrollBodyElem = refVirtualWrapper.value;
|
|
50648
50852
|
if (nodeid && scrollBodyElem) {
|
|
50649
50853
|
if (transform) {
|
|
50650
|
-
const matchObj =
|
|
50854
|
+
const matchObj = XEUtils111.findTree(afterTreeList, (item) => getNodeId(item) === nodeid, { children: transform ? mapChildrenField : childrenField });
|
|
50651
50855
|
if (matchObj) {
|
|
50652
50856
|
return $xeTree.setExpandNode(matchObj.nodes, true).then(() => {
|
|
50653
|
-
const itemIndex =
|
|
50857
|
+
const itemIndex = XEUtils111.findIndexOf(internalData.afterVisibleList, (item) => getNodeId(item) === nodeid);
|
|
50654
50858
|
if (itemIndex > -1) {
|
|
50655
50859
|
const targetTop = Math.max(0, (itemIndex - 1) * scrollYStore.rowHeight);
|
|
50656
50860
|
return handleScrollTo(scrollBodyElem.scrollLeft, targetTop);
|
|
@@ -50688,7 +50892,7 @@ var tree_default = defineVxeComponent({
|
|
|
50688
50892
|
getInsertRecords() {
|
|
50689
50893
|
const { insertNodeMaps } = internalData;
|
|
50690
50894
|
const insertRecords = [];
|
|
50691
|
-
|
|
50895
|
+
XEUtils111.each(insertNodeMaps, (item) => {
|
|
50692
50896
|
insertRecords.push(item);
|
|
50693
50897
|
});
|
|
50694
50898
|
return insertRecords;
|
|
@@ -50709,7 +50913,7 @@ var tree_default = defineVxeComponent({
|
|
|
50709
50913
|
let delList = [];
|
|
50710
50914
|
if (!nodes) {
|
|
50711
50915
|
nodes = treeFullData;
|
|
50712
|
-
} else if (!
|
|
50916
|
+
} else if (!XEUtils111.isArray(nodes)) {
|
|
50713
50917
|
nodes = [nodes];
|
|
50714
50918
|
}
|
|
50715
50919
|
if (!nodes.length) {
|
|
@@ -50727,12 +50931,12 @@ var tree_default = defineVxeComponent({
|
|
|
50727
50931
|
} else {
|
|
50728
50932
|
nodes.forEach((item) => {
|
|
50729
50933
|
const nodeid = getNodeId(item);
|
|
50730
|
-
const matchMapObj =
|
|
50934
|
+
const matchMapObj = XEUtils111.findTree(treeFullData, (item2) => nodeid === getNodeId(item2), { children: mapChildrenField });
|
|
50731
50935
|
if (matchMapObj) {
|
|
50732
50936
|
const rItems = matchMapObj.items.splice(matchMapObj.index, 1);
|
|
50733
50937
|
delList.push(rItems[0]);
|
|
50734
50938
|
}
|
|
50735
|
-
const matchObj =
|
|
50939
|
+
const matchObj = XEUtils111.findTree(treeFullData, (item2) => nodeid === getNodeId(item2), { children: childrenField });
|
|
50736
50940
|
if (matchObj) {
|
|
50737
50941
|
const rItems = matchObj.items.splice(matchObj.index, 1);
|
|
50738
50942
|
delList.push(rItems[0]);
|
|
@@ -50763,7 +50967,7 @@ var tree_default = defineVxeComponent({
|
|
|
50763
50967
|
getRemoveRecords() {
|
|
50764
50968
|
const { removeNodeMaps } = internalData;
|
|
50765
50969
|
const removeRecords = [];
|
|
50766
|
-
|
|
50970
|
+
XEUtils111.each(removeNodeMaps, (item) => {
|
|
50767
50971
|
removeRecords.push(item);
|
|
50768
50972
|
});
|
|
50769
50973
|
return removeRecords;
|
|
@@ -50789,7 +50993,7 @@ var tree_default = defineVxeComponent({
|
|
|
50789
50993
|
const el = refElem.value;
|
|
50790
50994
|
if (el) {
|
|
50791
50995
|
const clss = "node--drag-origin";
|
|
50792
|
-
|
|
50996
|
+
XEUtils111.arrayEach(el.querySelectorAll(`.${clss}`), (elem) => {
|
|
50793
50997
|
;
|
|
50794
50998
|
elem.draggable = false;
|
|
50795
50999
|
removeClass(elem, clss);
|
|
@@ -50801,7 +51005,7 @@ var tree_default = defineVxeComponent({
|
|
|
50801
51005
|
if (el) {
|
|
50802
51006
|
const clss = "node--drag-origin";
|
|
50803
51007
|
const nodeid = getNodeId(node);
|
|
50804
|
-
|
|
51008
|
+
XEUtils111.arrayEach(el.querySelectorAll(`.vxe-tree--node-wrapper[nodeid="${nodeid}"]`), (elem) => {
|
|
50805
51009
|
addClass(elem, clss);
|
|
50806
51010
|
});
|
|
50807
51011
|
}
|
|
@@ -50975,7 +51179,7 @@ var tree_default = defineVxeComponent({
|
|
|
50975
51179
|
if (oldRest && newRest) {
|
|
50976
51180
|
const { level: oldLevel } = oldRest;
|
|
50977
51181
|
const { level: newLevel } = newRest;
|
|
50978
|
-
|
|
51182
|
+
XEUtils111.eachTree(
|
|
50979
51183
|
[dragNode],
|
|
50980
51184
|
(item) => {
|
|
50981
51185
|
oldAllMaps[getNodeId(item)] = item;
|
|
@@ -50996,8 +51200,8 @@ var tree_default = defineVxeComponent({
|
|
|
50996
51200
|
if (oldAllMaps[newNodeid]) {
|
|
50997
51201
|
isSelfToChildStatus = true;
|
|
50998
51202
|
if (!(isCrossDrag && isSelfToChildDrag)) {
|
|
50999
|
-
if (
|
|
51000
|
-
|
|
51203
|
+
if (VxeUI184.modal) {
|
|
51204
|
+
VxeUI184.modal.message({
|
|
51001
51205
|
status: "error",
|
|
51002
51206
|
content: getI18n26("vxe.error.treeDragChild")
|
|
51003
51207
|
});
|
|
@@ -51020,8 +51224,8 @@ var tree_default = defineVxeComponent({
|
|
|
51020
51224
|
if (oldAllMaps[newNodeid]) {
|
|
51021
51225
|
isSelfToChildStatus = true;
|
|
51022
51226
|
if (!(isCrossDrag && isSelfToChildDrag)) {
|
|
51023
|
-
if (
|
|
51024
|
-
|
|
51227
|
+
if (VxeUI184.modal) {
|
|
51228
|
+
VxeUI184.modal.message({
|
|
51025
51229
|
status: "error",
|
|
51026
51230
|
content: getI18n26("vxe.error.treeDragChild")
|
|
51027
51231
|
});
|
|
@@ -51041,7 +51245,7 @@ var tree_default = defineVxeComponent({
|
|
|
51041
51245
|
}
|
|
51042
51246
|
if (transform) {
|
|
51043
51247
|
if (oldRest && newRest) {
|
|
51044
|
-
const fullList =
|
|
51248
|
+
const fullList = XEUtils111.toTreeArray(internalData.afterTreeList, {
|
|
51045
51249
|
updated: false,
|
|
51046
51250
|
key: keyField,
|
|
51047
51251
|
parentKey: parentField,
|
|
@@ -51053,12 +51257,12 @@ var tree_default = defineVxeComponent({
|
|
|
51053
51257
|
const ntfIndex = ptfIndex + dragOffsetIndex;
|
|
51054
51258
|
fullList.splice(ntfIndex, 0, dragNode);
|
|
51055
51259
|
if (isSelfToChildStatus && isCrossDrag && isSelfToChildDrag) {
|
|
51056
|
-
|
|
51260
|
+
XEUtils111.each(dragNode[childrenField], (childNode) => {
|
|
51057
51261
|
childNode[parentField] = dragNode[parentField];
|
|
51058
51262
|
});
|
|
51059
51263
|
}
|
|
51060
51264
|
dragNode[parentField] = isDragToChildFlag ? prevDragNode[keyField] : prevDragNode[parentField];
|
|
51061
|
-
internalData.treeFullData =
|
|
51265
|
+
internalData.treeFullData = XEUtils111.toArrayTree(fullList, {
|
|
51062
51266
|
key: keyField,
|
|
51063
51267
|
parentKey: parentField,
|
|
51064
51268
|
children: childrenField,
|
|
@@ -51276,7 +51480,7 @@ var tree_default = defineVxeComponent({
|
|
|
51276
51480
|
updateCheckboxStatus,
|
|
51277
51481
|
updateYSpace,
|
|
51278
51482
|
findNodeIndexOf(list, node) {
|
|
51279
|
-
return node ?
|
|
51483
|
+
return node ? XEUtils111.findIndexOf(list, (item) => $xeTree.eqNode(item, node)) : -1;
|
|
51280
51484
|
},
|
|
51281
51485
|
eqNode(node1, node2) {
|
|
51282
51486
|
if (node1 && node2) {
|
|
@@ -51322,7 +51526,7 @@ var tree_default = defineVxeComponent({
|
|
|
51322
51526
|
rsIndex = dragNodeRest.$index;
|
|
51323
51527
|
}
|
|
51324
51528
|
const dragRangeList = rsIndex > -1 && rsIndex < treeList.length - 1 ? treeList.slice(rsIndex + 1) : [];
|
|
51325
|
-
const dragList =
|
|
51529
|
+
const dragList = XEUtils111.toTreeArray([dragNode], {
|
|
51326
51530
|
updated: true,
|
|
51327
51531
|
children: mapChildrenField
|
|
51328
51532
|
});
|
|
@@ -51420,7 +51624,7 @@ var tree_default = defineVxeComponent({
|
|
|
51420
51624
|
return errRest;
|
|
51421
51625
|
}
|
|
51422
51626
|
let insertRest = Promise.resolve();
|
|
51423
|
-
const dragList =
|
|
51627
|
+
const dragList = XEUtils111.toTreeArray([dragNode], {
|
|
51424
51628
|
updated: true,
|
|
51425
51629
|
children: mapChildrenField
|
|
51426
51630
|
});
|
|
@@ -51645,14 +51849,14 @@ var tree_default = defineVxeComponent({
|
|
|
51645
51849
|
const childrenField = computeChildrenField.value;
|
|
51646
51850
|
const titleField = computeTitleField.value;
|
|
51647
51851
|
const hasChildField = computeHasChildField.value;
|
|
51648
|
-
const childList =
|
|
51852
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
51649
51853
|
const isExistChild = childList && childList.length > 0;
|
|
51650
51854
|
const iconSlot = slots.icon;
|
|
51651
51855
|
const titleSlot = slots.title;
|
|
51652
51856
|
const extraSlot = slots.extra;
|
|
51653
51857
|
const isExpand = updateExpandedFlag && treeExpandedMaps[nodeid];
|
|
51654
51858
|
const nodeItem = nodeMaps[nodeid] || {};
|
|
51655
|
-
const nodeTitle = getText(
|
|
51859
|
+
const nodeTitle = getText(XEUtils111.get(node, titleField));
|
|
51656
51860
|
const nLevel = nodeItem.level;
|
|
51657
51861
|
let isRadioChecked = false;
|
|
51658
51862
|
let isRadioDisabled = false;
|
|
@@ -51836,7 +52040,7 @@ var tree_default = defineVxeComponent({
|
|
|
51836
52040
|
} : (node) => {
|
|
51837
52041
|
const nodeid = getNodeId(node);
|
|
51838
52042
|
nodeVNs.push(renderNode(node, nodeid));
|
|
51839
|
-
const childList =
|
|
52043
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
51840
52044
|
const hasChild = childList && childList.length;
|
|
51841
52045
|
if (hasChild && treeExpandedMaps[nodeid]) {
|
|
51842
52046
|
nodeVNs.push(...renderList(childList));
|
|
@@ -52117,62 +52321,62 @@ var tree_default = defineVxeComponent({
|
|
|
52117
52321
|
);
|
|
52118
52322
|
};
|
|
52119
52323
|
const dataFlag = ref79(0);
|
|
52120
|
-
|
|
52324
|
+
watch49(
|
|
52121
52325
|
() => props.data ? props.data.length : 0,
|
|
52122
52326
|
() => {
|
|
52123
52327
|
dataFlag.value++;
|
|
52124
52328
|
}
|
|
52125
52329
|
);
|
|
52126
|
-
|
|
52330
|
+
watch49(
|
|
52127
52331
|
() => props.data,
|
|
52128
52332
|
() => {
|
|
52129
52333
|
dataFlag.value++;
|
|
52130
52334
|
}
|
|
52131
52335
|
);
|
|
52132
|
-
|
|
52336
|
+
watch49(
|
|
52133
52337
|
() => props.rootParentValue,
|
|
52134
52338
|
() => {
|
|
52135
52339
|
dataFlag.value++;
|
|
52136
52340
|
}
|
|
52137
52341
|
);
|
|
52138
|
-
|
|
52342
|
+
watch49(
|
|
52139
52343
|
() => props.rootValues ? props.rootValues.length : 0,
|
|
52140
52344
|
() => {
|
|
52141
52345
|
dataFlag.value++;
|
|
52142
52346
|
}
|
|
52143
52347
|
);
|
|
52144
|
-
|
|
52348
|
+
watch49(
|
|
52145
52349
|
() => props.rootValues,
|
|
52146
52350
|
() => {
|
|
52147
52351
|
dataFlag.value++;
|
|
52148
52352
|
}
|
|
52149
52353
|
);
|
|
52150
|
-
|
|
52354
|
+
watch49(dataFlag, () => {
|
|
52151
52355
|
loadData(props.data || []);
|
|
52152
52356
|
});
|
|
52153
|
-
|
|
52357
|
+
watch49(
|
|
52154
52358
|
() => props.checkNodeKey,
|
|
52155
52359
|
(nodeKey) => {
|
|
52156
52360
|
reactData.selectRadioKey = enModelValue(nodeKey);
|
|
52157
52361
|
}
|
|
52158
52362
|
);
|
|
52159
52363
|
const checkboxFlag = ref79(0);
|
|
52160
|
-
|
|
52364
|
+
watch49(
|
|
52161
52365
|
() => props.checkNodeKeys ? props.checkNodeKeys.length : 0,
|
|
52162
52366
|
() => {
|
|
52163
52367
|
checkboxFlag.value++;
|
|
52164
52368
|
}
|
|
52165
52369
|
);
|
|
52166
|
-
|
|
52370
|
+
watch49(
|
|
52167
52371
|
() => props.checkNodeKeys,
|
|
52168
52372
|
() => {
|
|
52169
52373
|
checkboxFlag.value++;
|
|
52170
52374
|
}
|
|
52171
52375
|
);
|
|
52172
|
-
|
|
52376
|
+
watch49(checkboxFlag, () => {
|
|
52173
52377
|
updateCheckboxChecked(props.checkNodeKeys || []);
|
|
52174
52378
|
});
|
|
52175
|
-
|
|
52379
|
+
watch49(
|
|
52176
52380
|
() => props.filterValue,
|
|
52177
52381
|
() => {
|
|
52178
52382
|
triggerSearchEvent(new Event("filter"));
|
|
@@ -52180,25 +52384,25 @@ var tree_default = defineVxeComponent({
|
|
|
52180
52384
|
);
|
|
52181
52385
|
const reScrollFlag = ref79(0);
|
|
52182
52386
|
const reLayoutFlag = ref79(0);
|
|
52183
|
-
|
|
52387
|
+
watch49(
|
|
52184
52388
|
() => props.height,
|
|
52185
52389
|
() => {
|
|
52186
52390
|
reLayoutFlag.value++;
|
|
52187
52391
|
}
|
|
52188
52392
|
);
|
|
52189
|
-
|
|
52393
|
+
watch49(
|
|
52190
52394
|
() => props.minHeight,
|
|
52191
52395
|
() => {
|
|
52192
52396
|
reLayoutFlag.value++;
|
|
52193
52397
|
}
|
|
52194
52398
|
);
|
|
52195
|
-
|
|
52399
|
+
watch49(
|
|
52196
52400
|
() => props.maxHeight,
|
|
52197
52401
|
() => {
|
|
52198
52402
|
reLayoutFlag.value++;
|
|
52199
52403
|
}
|
|
52200
52404
|
);
|
|
52201
|
-
|
|
52405
|
+
watch49(computeIsVScrollbar, () => {
|
|
52202
52406
|
nextTick34(() => {
|
|
52203
52407
|
bindScrollbarResize();
|
|
52204
52408
|
nextTick34(() => {
|
|
@@ -52206,33 +52410,33 @@ var tree_default = defineVxeComponent({
|
|
|
52206
52410
|
});
|
|
52207
52411
|
});
|
|
52208
52412
|
});
|
|
52209
|
-
|
|
52413
|
+
watch49(computeScrollYWidth, () => {
|
|
52210
52414
|
reLayoutFlag.value++;
|
|
52211
52415
|
});
|
|
52212
|
-
|
|
52416
|
+
watch49(computeScrollXHeight, () => {
|
|
52213
52417
|
reLayoutFlag.value++;
|
|
52214
52418
|
});
|
|
52215
|
-
|
|
52419
|
+
watch49(computeScrollXVisible, () => {
|
|
52216
52420
|
nextTick34(() => {
|
|
52217
52421
|
reLayoutFlag.value++;
|
|
52218
52422
|
});
|
|
52219
52423
|
});
|
|
52220
|
-
|
|
52424
|
+
watch49(computeScrollYVisible, () => {
|
|
52221
52425
|
nextTick34(() => {
|
|
52222
52426
|
reLayoutFlag.value++;
|
|
52223
52427
|
});
|
|
52224
52428
|
});
|
|
52225
|
-
|
|
52429
|
+
watch49(reLayoutFlag, () => {
|
|
52226
52430
|
recalculate().then(() => {
|
|
52227
52431
|
recalculate();
|
|
52228
52432
|
});
|
|
52229
52433
|
});
|
|
52230
|
-
|
|
52434
|
+
watch49(reScrollFlag, () => {
|
|
52231
52435
|
updateScrollbar().then(() => {
|
|
52232
52436
|
updateScrollbar();
|
|
52233
52437
|
});
|
|
52234
52438
|
});
|
|
52235
|
-
|
|
52439
|
+
onMounted53(() => {
|
|
52236
52440
|
const { transform, drag, menuConfig, showOverflow, lazy, loadMethod, autoResize } = props;
|
|
52237
52441
|
const dragOpts = computeDragOpts.value;
|
|
52238
52442
|
if (!showOverflow) {
|
|
@@ -52247,7 +52451,7 @@ var tree_default = defineVxeComponent({
|
|
|
52247
52451
|
if (lazy && !loadMethod) {
|
|
52248
52452
|
warnLog18("vxe.error.reqSupportProp", ["lazy", "load-method"]);
|
|
52249
52453
|
}
|
|
52250
|
-
const VxeUIContextMenu =
|
|
52454
|
+
const VxeUIContextMenu = VxeUI184.getComponent("VxeContextMenu");
|
|
52251
52455
|
if (menuConfig && !VxeUIContextMenu) {
|
|
52252
52456
|
errLog21("vxe.error.reqComp", ["vxe-context-menu"]);
|
|
52253
52457
|
}
|
|
@@ -52273,7 +52477,7 @@ var tree_default = defineVxeComponent({
|
|
|
52273
52477
|
reLayoutFlag.value++;
|
|
52274
52478
|
});
|
|
52275
52479
|
});
|
|
52276
|
-
|
|
52480
|
+
onBeforeUnmount23(() => {
|
|
52277
52481
|
const { scrollObserver, resizeObserver } = internalData;
|
|
52278
52482
|
if (resizeObserver) {
|
|
52279
52483
|
resizeObserver.disconnect();
|
|
@@ -52282,13 +52486,13 @@ var tree_default = defineVxeComponent({
|
|
|
52282
52486
|
scrollObserver.disconnect();
|
|
52283
52487
|
}
|
|
52284
52488
|
globalEvents25.off($xeTree, "resize");
|
|
52285
|
-
|
|
52286
|
-
|
|
52489
|
+
XEUtils111.assign(reactData, createReactData26());
|
|
52490
|
+
XEUtils111.assign(internalData, createInternalData25());
|
|
52287
52491
|
});
|
|
52288
52492
|
reactData.selectRadioKey = enModelValue(props.checkNodeKey);
|
|
52289
52493
|
loadData(props.data || []);
|
|
52290
52494
|
$xeTree.renderVN = renderVN;
|
|
52291
|
-
|
|
52495
|
+
provide32("$xeTree", $xeTree);
|
|
52292
52496
|
return $xeTree;
|
|
52293
52497
|
},
|
|
52294
52498
|
render() {
|
|
@@ -52303,23 +52507,23 @@ var VxeTree = Object.assign({}, tree_default, {
|
|
|
52303
52507
|
}
|
|
52304
52508
|
});
|
|
52305
52509
|
dynamicApp.use(VxeTree);
|
|
52306
|
-
|
|
52510
|
+
VxeUI185.component(tree_default);
|
|
52307
52511
|
var Tree = VxeTree;
|
|
52308
52512
|
var tree_default2 = VxeTree;
|
|
52309
52513
|
|
|
52310
52514
|
// packages_temp/tree-select/index.ts
|
|
52311
|
-
import { VxeUI as
|
|
52515
|
+
import { VxeUI as VxeUI187 } from "@vxe-ui/core";
|
|
52312
52516
|
|
|
52313
52517
|
// packages_temp/tree-select/src/tree-select.ts
|
|
52314
|
-
import { ref as ref80, computed as
|
|
52315
|
-
import { VxeUI as
|
|
52316
|
-
import
|
|
52317
|
-
var { getConfig: getConfig73, getI18n: getI18n27, getIcon: getIcon36, globalEvents: globalEvents26, createEvent:
|
|
52518
|
+
import { ref as ref80, computed as computed62, h as h94, nextTick as nextTick35, inject as inject45, provide as provide33, reactive as reactive86, Teleport as Teleport14, onMounted as onMounted54, onBeforeUnmount as onBeforeUnmount24, watch as watch50 } from "vue";
|
|
52519
|
+
import { VxeUI as VxeUI186 } from "@vxe-ui/core";
|
|
52520
|
+
import XEUtils112 from "xe-utils";
|
|
52521
|
+
var { getConfig: getConfig73, getI18n: getI18n27, getIcon: getIcon36, globalEvents: globalEvents26, createEvent: createEvent82, useFns: useFns62, renderEmptyElement: renderEmptyElement59 } = VxeUI186;
|
|
52318
52522
|
var { warnLog: warnLog19, errLog: errLog22 } = createComponentLog("tree-select");
|
|
52319
52523
|
function getOptUniqueId2() {
|
|
52320
|
-
return
|
|
52524
|
+
return XEUtils112.uniqueId("node_");
|
|
52321
52525
|
}
|
|
52322
|
-
function
|
|
52526
|
+
function createReactData27() {
|
|
52323
52527
|
return {
|
|
52324
52528
|
initialized: false,
|
|
52325
52529
|
searchValue: "",
|
|
@@ -52335,7 +52539,7 @@ function createReactData26() {
|
|
|
52335
52539
|
lazyOptFlag: 1
|
|
52336
52540
|
};
|
|
52337
52541
|
}
|
|
52338
|
-
function
|
|
52542
|
+
function createInternalData26() {
|
|
52339
52543
|
return {
|
|
52340
52544
|
// hpTimeout: undefined,
|
|
52341
52545
|
fullOptionList: [],
|
|
@@ -52353,7 +52557,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52353
52557
|
},
|
|
52354
52558
|
placeholder: {
|
|
52355
52559
|
type: String,
|
|
52356
|
-
default: () =>
|
|
52560
|
+
default: () => XEUtils112.eqNull(getConfig73().treeSelect.placeholder) ? getI18n27("vxe.base.pleaseSelect") : getConfig73().treeSelect.placeholder
|
|
52357
52561
|
},
|
|
52358
52562
|
readonly: {
|
|
52359
52563
|
type: Boolean,
|
|
@@ -52460,25 +52664,25 @@ var tree_select_default = defineVxeComponent({
|
|
|
52460
52664
|
emits: ["update:modelValue", "change", "all-change", "clear", "blur", "focus", "click", "node-click", "visible-change"],
|
|
52461
52665
|
setup(props, context) {
|
|
52462
52666
|
const { emit, slots } = context;
|
|
52463
|
-
const $xeModal =
|
|
52464
|
-
const $xeDrawer =
|
|
52465
|
-
const $xeTable =
|
|
52466
|
-
const $xeForm =
|
|
52467
|
-
const formItemInfo =
|
|
52468
|
-
const xID =
|
|
52469
|
-
const { computeSize } =
|
|
52667
|
+
const $xeModal = inject45("$xeModal", null);
|
|
52668
|
+
const $xeDrawer = inject45("$xeDrawer", null);
|
|
52669
|
+
const $xeTable = inject45("$xeTable", null);
|
|
52670
|
+
const $xeForm = inject45("$xeForm", null);
|
|
52671
|
+
const formItemInfo = inject45("xeFormItemInfo", null);
|
|
52672
|
+
const xID = XEUtils112.uniqueId();
|
|
52673
|
+
const { computeSize } = useFns62.useSize(props);
|
|
52470
52674
|
const refElem = ref80();
|
|
52471
52675
|
const refInput = ref80();
|
|
52472
52676
|
const refInpSearch = ref80();
|
|
52473
52677
|
const refTreeWrapper = ref80();
|
|
52474
52678
|
const refOptionPanel = ref80();
|
|
52475
52679
|
const refTree = ref80();
|
|
52476
|
-
const reactData =
|
|
52477
|
-
const internalData =
|
|
52680
|
+
const reactData = reactive86(createReactData27());
|
|
52681
|
+
const internalData = createInternalData26();
|
|
52478
52682
|
const refMaps = {
|
|
52479
52683
|
refElem
|
|
52480
52684
|
};
|
|
52481
|
-
const computeFormReadonly =
|
|
52685
|
+
const computeFormReadonly = computed62(() => {
|
|
52482
52686
|
const { readonly } = props;
|
|
52483
52687
|
if (readonly === null) {
|
|
52484
52688
|
if ($xeForm) {
|
|
@@ -52488,7 +52692,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52488
52692
|
}
|
|
52489
52693
|
return readonly;
|
|
52490
52694
|
});
|
|
52491
|
-
const computeIsDisabled =
|
|
52695
|
+
const computeIsDisabled = computed62(() => {
|
|
52492
52696
|
const { disabled } = props;
|
|
52493
52697
|
if (disabled === null) {
|
|
52494
52698
|
if ($xeForm) {
|
|
@@ -52498,15 +52702,15 @@ var tree_select_default = defineVxeComponent({
|
|
|
52498
52702
|
}
|
|
52499
52703
|
return disabled;
|
|
52500
52704
|
});
|
|
52501
|
-
const computeBtnTransfer =
|
|
52705
|
+
const computeBtnTransfer = computed62(() => {
|
|
52502
52706
|
const popupOpts = computePopupOpts.value;
|
|
52503
52707
|
const { transfer } = popupOpts;
|
|
52504
|
-
if (
|
|
52708
|
+
if (XEUtils112.isBoolean(transfer)) {
|
|
52505
52709
|
return transfer;
|
|
52506
52710
|
}
|
|
52507
52711
|
if (props.transfer === null) {
|
|
52508
52712
|
const globalTransfer = getConfig73().treeSelect.transfer;
|
|
52509
|
-
if (
|
|
52713
|
+
if (XEUtils112.isBoolean(globalTransfer)) {
|
|
52510
52714
|
return globalTransfer;
|
|
52511
52715
|
}
|
|
52512
52716
|
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
@@ -52515,25 +52719,25 @@ var tree_select_default = defineVxeComponent({
|
|
|
52515
52719
|
}
|
|
52516
52720
|
return props.transfer;
|
|
52517
52721
|
});
|
|
52518
|
-
const computePopupOpts =
|
|
52722
|
+
const computePopupOpts = computed62(() => {
|
|
52519
52723
|
return Object.assign({}, getConfig73().treeSelect.popupConfig, props.popupConfig);
|
|
52520
52724
|
});
|
|
52521
|
-
const computeTreeOpts =
|
|
52725
|
+
const computeTreeOpts = computed62(() => {
|
|
52522
52726
|
return Object.assign({}, getConfig73().treeSelect.treeConfig, props.treeConfig, { data: void 0 });
|
|
52523
52727
|
});
|
|
52524
|
-
const computeMenuOpts =
|
|
52728
|
+
const computeMenuOpts = computed62(() => {
|
|
52525
52729
|
return Object.assign({}, getConfig73().treeSelect.menuConfig, props.menuConfig);
|
|
52526
52730
|
});
|
|
52527
|
-
const computeTreeNodeOpts =
|
|
52731
|
+
const computeTreeNodeOpts = computed62(() => {
|
|
52528
52732
|
const treeOpts = computeTreeOpts.value;
|
|
52529
52733
|
return Object.assign({ isHover: true }, treeOpts.nodeConfig);
|
|
52530
52734
|
});
|
|
52531
|
-
const computeTreeCheckboxOpts =
|
|
52735
|
+
const computeTreeCheckboxOpts = computed62(() => {
|
|
52532
52736
|
const { showCheckbox, checkboxConfig } = props;
|
|
52533
52737
|
const treeOpts = computeTreeOpts.value;
|
|
52534
52738
|
return Object.assign(
|
|
52535
52739
|
{
|
|
52536
|
-
showIcon:
|
|
52740
|
+
showIcon: XEUtils112.isBoolean(showCheckbox) ? showCheckbox : !!treeOpts.showCheckbox
|
|
52537
52741
|
},
|
|
52538
52742
|
treeOpts.checkboxConfig,
|
|
52539
52743
|
checkboxConfig,
|
|
@@ -52542,12 +52746,12 @@ var tree_select_default = defineVxeComponent({
|
|
|
52542
52746
|
}
|
|
52543
52747
|
);
|
|
52544
52748
|
});
|
|
52545
|
-
const computeTreeRadioOpts =
|
|
52749
|
+
const computeTreeRadioOpts = computed62(() => {
|
|
52546
52750
|
const { showRadio, radioConfig } = props;
|
|
52547
52751
|
const treeOpts = computeTreeOpts.value;
|
|
52548
52752
|
return Object.assign(
|
|
52549
52753
|
{
|
|
52550
|
-
showIcon:
|
|
52754
|
+
showIcon: XEUtils112.isBoolean(showRadio) ? showRadio : !!treeOpts.showRadio
|
|
52551
52755
|
},
|
|
52552
52756
|
treeOpts.radioConfig,
|
|
52553
52757
|
radioConfig,
|
|
@@ -52556,49 +52760,49 @@ var tree_select_default = defineVxeComponent({
|
|
|
52556
52760
|
}
|
|
52557
52761
|
);
|
|
52558
52762
|
});
|
|
52559
|
-
const computePropsOpts =
|
|
52763
|
+
const computePropsOpts = computed62(() => {
|
|
52560
52764
|
return Object.assign({}, getConfig73().treeSelect.optionProps, props.optionProps);
|
|
52561
52765
|
});
|
|
52562
|
-
const computeNodeKeyField =
|
|
52766
|
+
const computeNodeKeyField = computed62(() => {
|
|
52563
52767
|
const treeOpts = computeTreeOpts.value;
|
|
52564
52768
|
return treeOpts.keyField || "id";
|
|
52565
52769
|
});
|
|
52566
|
-
const computeLabelField =
|
|
52770
|
+
const computeLabelField = computed62(() => {
|
|
52567
52771
|
const propsOpts = computePropsOpts.value;
|
|
52568
52772
|
return propsOpts.label || "label";
|
|
52569
52773
|
});
|
|
52570
|
-
const computeValueField =
|
|
52774
|
+
const computeValueField = computed62(() => {
|
|
52571
52775
|
const propsOpts = computePropsOpts.value;
|
|
52572
52776
|
return propsOpts.value || "value";
|
|
52573
52777
|
});
|
|
52574
|
-
const computeChildrenField =
|
|
52778
|
+
const computeChildrenField = computed62(() => {
|
|
52575
52779
|
const propsOpts = computePropsOpts.value;
|
|
52576
52780
|
return propsOpts.children || "children";
|
|
52577
52781
|
});
|
|
52578
|
-
const computeNodeParentField =
|
|
52782
|
+
const computeNodeParentField = computed62(() => {
|
|
52579
52783
|
const propsOpts = computePropsOpts.value;
|
|
52580
52784
|
const treeOpts = computeTreeOpts.value;
|
|
52581
52785
|
return propsOpts.parent || treeOpts.parentField || "parentId";
|
|
52582
52786
|
});
|
|
52583
|
-
const computeHasChildField =
|
|
52787
|
+
const computeHasChildField = computed62(() => {
|
|
52584
52788
|
const propsOpts = computePropsOpts.value;
|
|
52585
52789
|
return propsOpts.hasChild || "hasChild";
|
|
52586
52790
|
});
|
|
52587
|
-
const computeVirtualYOpts =
|
|
52791
|
+
const computeVirtualYOpts = computed62(() => {
|
|
52588
52792
|
return Object.assign({}, getConfig73().treeSelect.virtualYConfig, props.virtualYConfig);
|
|
52589
52793
|
});
|
|
52590
|
-
const computeRemoteOpts =
|
|
52794
|
+
const computeRemoteOpts = computed62(() => {
|
|
52591
52795
|
return Object.assign({}, getConfig73().treeSelect.remoteConfig, props.remoteConfig);
|
|
52592
52796
|
});
|
|
52593
|
-
const computeFilterOpts =
|
|
52797
|
+
const computeFilterOpts = computed62(() => {
|
|
52594
52798
|
const treeOpts = computeTreeOpts.value;
|
|
52595
52799
|
return Object.assign({}, treeOpts.filterConfig, props.filterConfig);
|
|
52596
52800
|
});
|
|
52597
|
-
const computeSelectVals =
|
|
52801
|
+
const computeSelectVals = computed62(() => {
|
|
52598
52802
|
const { modelValue } = props;
|
|
52599
|
-
return
|
|
52803
|
+
return XEUtils112.eqNull(modelValue) ? [] : XEUtils112.isArray(modelValue) ? modelValue : [modelValue];
|
|
52600
52804
|
});
|
|
52601
|
-
const computeSelectLabel =
|
|
52805
|
+
const computeSelectLabel = computed62(() => {
|
|
52602
52806
|
const { showFullLabel } = props;
|
|
52603
52807
|
const { fullOptFlag, lazyOptFlag: lazyOptFlag2 } = reactData;
|
|
52604
52808
|
const { fullNodeMaps, lazyNodeMaps } = internalData;
|
|
@@ -52618,7 +52822,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52618
52822
|
return val;
|
|
52619
52823
|
}).join(", ");
|
|
52620
52824
|
});
|
|
52621
|
-
const computePopupWrapperStyle =
|
|
52825
|
+
const computePopupWrapperStyle = computed62(() => {
|
|
52622
52826
|
const popupOpts = computePopupOpts.value;
|
|
52623
52827
|
const { height, width } = popupOpts;
|
|
52624
52828
|
const stys = {};
|
|
@@ -52642,17 +52846,17 @@ var tree_select_default = defineVxeComponent({
|
|
|
52642
52846
|
getComputeMaps: () => computeMaps
|
|
52643
52847
|
};
|
|
52644
52848
|
const dispatchEvent = (type, params, evnt) => {
|
|
52645
|
-
emit(type,
|
|
52849
|
+
emit(type, createEvent82(evnt, { $treeSelect: $xeTreeSelect }, params));
|
|
52646
52850
|
};
|
|
52647
52851
|
const emitModel = (value) => {
|
|
52648
52852
|
emit("update:modelValue", value);
|
|
52649
52853
|
};
|
|
52650
52854
|
const callSlot = (slotFunc, params) => {
|
|
52651
52855
|
if (slotFunc) {
|
|
52652
|
-
if (
|
|
52856
|
+
if (XEUtils112.isString(slotFunc)) {
|
|
52653
52857
|
slotFunc = slots[slotFunc] || null;
|
|
52654
52858
|
}
|
|
52655
|
-
if (
|
|
52859
|
+
if (XEUtils112.isFunction(slotFunc)) {
|
|
52656
52860
|
return getSlotVNs(slotFunc(params));
|
|
52657
52861
|
}
|
|
52658
52862
|
}
|
|
@@ -52701,16 +52905,16 @@ var tree_select_default = defineVxeComponent({
|
|
|
52701
52905
|
};
|
|
52702
52906
|
if (optList) {
|
|
52703
52907
|
if (transform) {
|
|
52704
|
-
const treeList =
|
|
52908
|
+
const treeList = XEUtils112.toArrayTree(optList, {
|
|
52705
52909
|
key: nodeKeyField,
|
|
52706
52910
|
parentKey: nodeParentField,
|
|
52707
52911
|
mapChildren: childrenField,
|
|
52708
52912
|
rootParentValue: treeOpts.rootParentValue,
|
|
52709
52913
|
rootValues: treeOpts.rootValues
|
|
52710
52914
|
});
|
|
52711
|
-
|
|
52915
|
+
XEUtils112.eachTree(treeList, handleOptNode, { children: childrenField });
|
|
52712
52916
|
} else {
|
|
52713
|
-
|
|
52917
|
+
XEUtils112.eachTree(optList, handleOptNode, { children: childrenField });
|
|
52714
52918
|
}
|
|
52715
52919
|
}
|
|
52716
52920
|
return nodeMaps;
|
|
@@ -52730,7 +52934,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52730
52934
|
const popupOpts = computePopupOpts.value;
|
|
52731
52935
|
const customZIndex = popupOpts.zIndex || props.zIndex;
|
|
52732
52936
|
if (customZIndex) {
|
|
52733
|
-
reactData.panelIndex =
|
|
52937
|
+
reactData.panelIndex = XEUtils112.toNumber(customZIndex);
|
|
52734
52938
|
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
52735
52939
|
reactData.panelIndex = nextZIndex();
|
|
52736
52940
|
}
|
|
@@ -52801,7 +53005,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52801
53005
|
dispatchEvent("visible-change", { visible: false }, evnt || null);
|
|
52802
53006
|
};
|
|
52803
53007
|
const changeEvent = (evnt, selectValue, node) => {
|
|
52804
|
-
const value =
|
|
53008
|
+
const value = XEUtils112.isArray(selectValue) ? selectValue.map(deModelValue) : deModelValue(selectValue);
|
|
52805
53009
|
emitModel(value);
|
|
52806
53010
|
if (value !== props.modelValue) {
|
|
52807
53011
|
dispatchEvent("change", { value, node, option: node }, evnt);
|
|
@@ -52828,7 +53032,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52828
53032
|
$tree.setAllCheckboxNode(true).then(({ checkNodeKeys, checkNodes }) => {
|
|
52829
53033
|
changeEvent($event, checkNodeKeys, checkNodes[0]);
|
|
52830
53034
|
dispatchEvent("all-change", { value: checkNodeKeys }, $event);
|
|
52831
|
-
if (
|
|
53035
|
+
if (XEUtils112.isBoolean(checkedClosable) ? checkedClosable : autoClose) {
|
|
52832
53036
|
hideOptionPanel($event);
|
|
52833
53037
|
}
|
|
52834
53038
|
});
|
|
@@ -52842,7 +53046,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52842
53046
|
if ($tree) {
|
|
52843
53047
|
const value = multiple ? [] : null;
|
|
52844
53048
|
$tree.clearCheckboxNode().then(() => {
|
|
52845
|
-
if (
|
|
53049
|
+
if (XEUtils112.isBoolean(clearClosable) ? clearClosable : autoClose) {
|
|
52846
53050
|
hideOptionPanel($event);
|
|
52847
53051
|
}
|
|
52848
53052
|
});
|
|
@@ -53032,7 +53236,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
53032
53236
|
const virtualYOpts = computeVirtualYOpts.value;
|
|
53033
53237
|
const filterOpts = computeFilterOpts.value;
|
|
53034
53238
|
const { slots: treeSlots } = treeOpts;
|
|
53035
|
-
const selectVals =
|
|
53239
|
+
const selectVals = XEUtils112.eqNull(modelValue) ? [] : XEUtils112.isArray(modelValue) ? modelValue : [modelValue];
|
|
53036
53240
|
const treeScopedSlots = {};
|
|
53037
53241
|
if (treeSlots) {
|
|
53038
53242
|
const { icon: treeIconSlot, title: treeTitleSlot, extra: treeExtraSlot } = treeSlots;
|
|
@@ -53052,7 +53256,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
53052
53256
|
ref: refElem,
|
|
53053
53257
|
class: [
|
|
53054
53258
|
"vxe-tree-select",
|
|
53055
|
-
className ?
|
|
53259
|
+
className ? XEUtils112.isFunction(className) ? className({ $treeSelect: $xeTreeSelect }) : className : "",
|
|
53056
53260
|
{
|
|
53057
53261
|
[`size--${vSize}`]: vSize,
|
|
53058
53262
|
"is--filterable": filterable,
|
|
@@ -53100,7 +53304,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
53100
53304
|
ref: refOptionPanel,
|
|
53101
53305
|
class: [
|
|
53102
53306
|
"vxe-table--ignore-clear vxe-tree-select--panel",
|
|
53103
|
-
ppClassName ?
|
|
53307
|
+
ppClassName ? XEUtils112.isFunction(ppClassName) ? ppClassName({ $treeSelect: $xeTreeSelect }) : ppClassName : "",
|
|
53104
53308
|
{
|
|
53105
53309
|
[`size--${vSize}`]: vSize,
|
|
53106
53310
|
"is--transfer": btnTransfer,
|
|
@@ -53304,41 +53508,41 @@ var tree_select_default = defineVxeComponent({
|
|
|
53304
53508
|
);
|
|
53305
53509
|
};
|
|
53306
53510
|
const optFlag = ref80(0);
|
|
53307
|
-
|
|
53511
|
+
watch50(
|
|
53308
53512
|
() => props.options ? props.options.length : -1,
|
|
53309
53513
|
() => {
|
|
53310
53514
|
optFlag.value++;
|
|
53311
53515
|
}
|
|
53312
53516
|
);
|
|
53313
|
-
|
|
53517
|
+
watch50(
|
|
53314
53518
|
() => props.options,
|
|
53315
53519
|
() => {
|
|
53316
53520
|
optFlag.value++;
|
|
53317
53521
|
}
|
|
53318
53522
|
);
|
|
53319
|
-
|
|
53523
|
+
watch50(optFlag, () => {
|
|
53320
53524
|
cacheDataMap();
|
|
53321
53525
|
});
|
|
53322
53526
|
const lazyOptFlag = ref80(0);
|
|
53323
|
-
|
|
53527
|
+
watch50(
|
|
53324
53528
|
() => props.lazyOptions ? props.lazyOptions.length : -1,
|
|
53325
53529
|
() => {
|
|
53326
53530
|
lazyOptFlag.value++;
|
|
53327
53531
|
}
|
|
53328
53532
|
);
|
|
53329
|
-
|
|
53533
|
+
watch50(
|
|
53330
53534
|
() => props.lazyOptions,
|
|
53331
53535
|
() => {
|
|
53332
53536
|
lazyOptFlag.value++;
|
|
53333
53537
|
}
|
|
53334
53538
|
);
|
|
53335
|
-
|
|
53539
|
+
watch50(lazyOptFlag, () => {
|
|
53336
53540
|
cacheLazyDataMap();
|
|
53337
53541
|
});
|
|
53338
53542
|
cacheDataMap();
|
|
53339
53543
|
cacheLazyDataMap();
|
|
53340
|
-
|
|
53341
|
-
if (
|
|
53544
|
+
onMounted54(() => {
|
|
53545
|
+
if (XEUtils112.isBoolean(props.autoClose)) {
|
|
53342
53546
|
warnLog19("vxe.error.delProp", ["auto-close", "checked-closable | clear-closable"]);
|
|
53343
53547
|
}
|
|
53344
53548
|
globalEvents26.on($xeTreeSelect, "mousedown", handleGlobalMousedownEvent);
|
|
@@ -53346,15 +53550,15 @@ var tree_select_default = defineVxeComponent({
|
|
|
53346
53550
|
globalEvents26.on($xeTreeSelect, "resize", handleGlobalResizeEvent);
|
|
53347
53551
|
globalEvents26.on($xeTreeSelect, "scroll", handleGlobalScrollEvent);
|
|
53348
53552
|
});
|
|
53349
|
-
|
|
53553
|
+
onBeforeUnmount24(() => {
|
|
53350
53554
|
globalEvents26.off($xeTreeSelect, "mousedown");
|
|
53351
53555
|
globalEvents26.off($xeTreeSelect, "blur");
|
|
53352
53556
|
globalEvents26.off($xeTreeSelect, "resize");
|
|
53353
53557
|
globalEvents26.off($xeTreeSelect, "scroll");
|
|
53354
|
-
|
|
53355
|
-
|
|
53558
|
+
XEUtils112.assign(reactData, createReactData27());
|
|
53559
|
+
XEUtils112.assign(internalData, createInternalData26());
|
|
53356
53560
|
});
|
|
53357
|
-
|
|
53561
|
+
provide33("$xeTreeSelect", $xeTreeSelect);
|
|
53358
53562
|
$xeTreeSelect.renderVN = renderVN;
|
|
53359
53563
|
return $xeTreeSelect;
|
|
53360
53564
|
},
|
|
@@ -53370,23 +53574,23 @@ var VxeTreeSelect = Object.assign({}, tree_select_default, {
|
|
|
53370
53574
|
}
|
|
53371
53575
|
});
|
|
53372
53576
|
dynamicApp.use(VxeTreeSelect);
|
|
53373
|
-
|
|
53577
|
+
VxeUI187.component(tree_select_default);
|
|
53374
53578
|
var TreeSelect = VxeTreeSelect;
|
|
53375
53579
|
var tree_select_default2 = VxeTreeSelect;
|
|
53376
53580
|
|
|
53377
53581
|
// packages_temp/upload/src/upload.ts
|
|
53378
|
-
import { ref as ref81, h as h95, reactive as
|
|
53379
|
-
import
|
|
53380
|
-
import { VxeUI as
|
|
53582
|
+
import { ref as ref81, h as h95, reactive as reactive87, watch as watch51, computed as computed63, TransitionGroup, inject as inject46, onBeforeUnmount as onBeforeUnmount25, onMounted as onMounted55, nextTick as nextTick36 } from "vue";
|
|
53583
|
+
import XEUtils114 from "xe-utils";
|
|
53584
|
+
import { VxeUI as VxeUI189 } from "@vxe-ui/core";
|
|
53381
53585
|
|
|
53382
53586
|
// packages_temp/upload/src/util.ts
|
|
53383
|
-
import
|
|
53384
|
-
import { VxeUI as
|
|
53587
|
+
import XEUtils113 from "xe-utils";
|
|
53588
|
+
import { VxeUI as VxeUI188, getI18n as getI18n28 } from "@vxe-ui/core";
|
|
53385
53589
|
var fileForm = null;
|
|
53386
53590
|
var fileInput = null;
|
|
53387
53591
|
function parseFile(file) {
|
|
53388
53592
|
const name = file.name;
|
|
53389
|
-
const tIndex =
|
|
53593
|
+
const tIndex = XEUtils113.lastIndexOf(name, ".");
|
|
53390
53594
|
const type = name.substring(tIndex + 1, name.length).toLowerCase();
|
|
53391
53595
|
const filename = name.substring(0, tIndex);
|
|
53392
53596
|
return { filename, type };
|
|
@@ -53417,7 +53621,7 @@ var readLocalFile = (options) => {
|
|
|
53417
53621
|
if (!isAllType) {
|
|
53418
53622
|
for (let fIndex = 0; fIndex < files.length; fIndex++) {
|
|
53419
53623
|
const { type } = parseFile(files[fIndex]);
|
|
53420
|
-
if (!
|
|
53624
|
+
if (!XEUtils113.includes(types, type)) {
|
|
53421
53625
|
errType = type;
|
|
53422
53626
|
break;
|
|
53423
53627
|
}
|
|
@@ -53427,8 +53631,8 @@ var readLocalFile = (options) => {
|
|
|
53427
53631
|
resolve({ status: true, files, file });
|
|
53428
53632
|
} else {
|
|
53429
53633
|
if (opts.message !== false) {
|
|
53430
|
-
if (
|
|
53431
|
-
|
|
53634
|
+
if (VxeUI188.modal) {
|
|
53635
|
+
VxeUI188.modal.message({
|
|
53432
53636
|
content: getI18n28("vxe.error.notType", [errType]),
|
|
53433
53637
|
status: "error"
|
|
53434
53638
|
});
|
|
@@ -53450,7 +53654,7 @@ var saveLocalFile = (options) => {
|
|
|
53450
53654
|
const { filename, type, content } = opts;
|
|
53451
53655
|
const name = type ? `${filename}.${type}` : `${filename}`;
|
|
53452
53656
|
if (window.Blob) {
|
|
53453
|
-
const blob = content instanceof Blob ? content : getExportBlobByContent(
|
|
53657
|
+
const blob = content instanceof Blob ? content : getExportBlobByContent(XEUtils113.toValueString(content), opts);
|
|
53454
53658
|
const winNavigator = window.navigator;
|
|
53455
53659
|
if (winNavigator.msSaveBlob) {
|
|
53456
53660
|
winNavigator.msSaveBlob(blob, name);
|
|
@@ -53475,9 +53679,9 @@ var saveLocalFile = (options) => {
|
|
|
53475
53679
|
};
|
|
53476
53680
|
|
|
53477
53681
|
// packages_temp/upload/src/upload.ts
|
|
53478
|
-
var { getConfig: getConfig74, getI18n: getI18n29, getIcon: getIcon37, useFns:
|
|
53682
|
+
var { getConfig: getConfig74, getI18n: getI18n29, getIcon: getIcon37, useFns: useFns63, createEvent: createEvent83, globalEvents: globalEvents27, renderEmptyElement: renderEmptyElement60 } = VxeUI189;
|
|
53479
53683
|
var { warnLog: warnLog20, errLog: errLog23 } = createComponentLog("upload");
|
|
53480
|
-
function
|
|
53684
|
+
function createReactData28() {
|
|
53481
53685
|
return {
|
|
53482
53686
|
isDragUploadStatus: false,
|
|
53483
53687
|
showMorePopup: false,
|
|
@@ -53489,9 +53693,9 @@ function createReactData27() {
|
|
|
53489
53693
|
dragTipText: ""
|
|
53490
53694
|
};
|
|
53491
53695
|
}
|
|
53492
|
-
function
|
|
53696
|
+
function createInternalData27() {
|
|
53493
53697
|
return {
|
|
53494
|
-
moreId:
|
|
53698
|
+
moreId: XEUtils114.uniqueId("upload"),
|
|
53495
53699
|
imagePreviewTypes: ["jpg", "jpeg", "png", "gif"],
|
|
53496
53700
|
prevDragIndex: -1
|
|
53497
53701
|
// prevDragPos: ''
|
|
@@ -53524,11 +53728,11 @@ var upload_default = defineVxeComponent({
|
|
|
53524
53728
|
},
|
|
53525
53729
|
imageTypes: {
|
|
53526
53730
|
type: Array,
|
|
53527
|
-
default: () =>
|
|
53731
|
+
default: () => XEUtils114.clone(getConfig74().upload.imageTypes, true)
|
|
53528
53732
|
},
|
|
53529
53733
|
imageConfig: {
|
|
53530
53734
|
type: Object,
|
|
53531
|
-
default: () =>
|
|
53735
|
+
default: () => XEUtils114.clone(getConfig74().upload.imageConfig, true)
|
|
53532
53736
|
},
|
|
53533
53737
|
/**
|
|
53534
53738
|
* 已废弃,被 image-config 替换
|
|
@@ -53536,16 +53740,16 @@ var upload_default = defineVxeComponent({
|
|
|
53536
53740
|
*/
|
|
53537
53741
|
imageStyle: {
|
|
53538
53742
|
type: Object,
|
|
53539
|
-
default: () =>
|
|
53743
|
+
default: () => XEUtils114.clone(getConfig74().upload.imageStyle, true)
|
|
53540
53744
|
},
|
|
53541
53745
|
fileTypes: {
|
|
53542
53746
|
type: Array,
|
|
53543
|
-
default: () =>
|
|
53747
|
+
default: () => XEUtils114.clone(getConfig74().upload.fileTypes, true)
|
|
53544
53748
|
},
|
|
53545
53749
|
dragSort: Boolean,
|
|
53546
53750
|
dragToUpload: {
|
|
53547
53751
|
type: Boolean,
|
|
53548
|
-
default: () =>
|
|
53752
|
+
default: () => XEUtils114.clone(getConfig74().upload.dragToUpload, true)
|
|
53549
53753
|
},
|
|
53550
53754
|
dragPlaceholder: {
|
|
53551
53755
|
type: String,
|
|
@@ -53553,7 +53757,7 @@ var upload_default = defineVxeComponent({
|
|
|
53553
53757
|
},
|
|
53554
53758
|
pasteToUpload: {
|
|
53555
53759
|
type: Boolean,
|
|
53556
|
-
default: () =>
|
|
53760
|
+
default: () => XEUtils114.clone(getConfig74().upload.pasteToUpload, true)
|
|
53557
53761
|
},
|
|
53558
53762
|
keyField: String,
|
|
53559
53763
|
singleMode: Boolean,
|
|
@@ -53680,21 +53884,21 @@ var upload_default = defineVxeComponent({
|
|
|
53680
53884
|
emits: ["update:modelValue", "change", "add", "remove", "remove-fail", "download", "download-fail", "upload-start", "upload-success", "upload-error", "upload-end", "upload-queue-start", "upload-queue-end", "sort-dragend", "more-visible"],
|
|
53681
53885
|
setup(props, context) {
|
|
53682
53886
|
const { emit, slots } = context;
|
|
53683
|
-
const $xeForm =
|
|
53684
|
-
const formItemInfo =
|
|
53685
|
-
const $xeTable =
|
|
53686
|
-
const xID =
|
|
53687
|
-
const { computeSize } =
|
|
53887
|
+
const $xeForm = inject46("$xeForm", null);
|
|
53888
|
+
const formItemInfo = inject46("xeFormItemInfo", null);
|
|
53889
|
+
const $xeTable = inject46("$xeTable", null);
|
|
53890
|
+
const xID = XEUtils114.uniqueId();
|
|
53891
|
+
const { computeSize } = useFns63.useSize(props);
|
|
53688
53892
|
const refElem = ref81();
|
|
53689
53893
|
const refPopupElem = ref81();
|
|
53690
53894
|
const refDragLineElem = ref81();
|
|
53691
53895
|
const refModalDragLineElem = ref81();
|
|
53692
|
-
const reactData =
|
|
53693
|
-
const internalData =
|
|
53896
|
+
const reactData = reactive87(createReactData28());
|
|
53897
|
+
const internalData = createInternalData27();
|
|
53694
53898
|
const refMaps = {
|
|
53695
53899
|
refElem
|
|
53696
53900
|
};
|
|
53697
|
-
const computeFormReadonly =
|
|
53901
|
+
const computeFormReadonly = computed63(() => {
|
|
53698
53902
|
const { readonly } = props;
|
|
53699
53903
|
if (readonly === null) {
|
|
53700
53904
|
if ($xeForm) {
|
|
@@ -53704,7 +53908,7 @@ var upload_default = defineVxeComponent({
|
|
|
53704
53908
|
}
|
|
53705
53909
|
return readonly;
|
|
53706
53910
|
});
|
|
53707
|
-
const computeIsDisabled =
|
|
53911
|
+
const computeIsDisabled = computed63(() => {
|
|
53708
53912
|
const { disabled } = props;
|
|
53709
53913
|
if (disabled === null) {
|
|
53710
53914
|
if ($xeForm) {
|
|
@@ -53714,31 +53918,31 @@ var upload_default = defineVxeComponent({
|
|
|
53714
53918
|
}
|
|
53715
53919
|
return disabled;
|
|
53716
53920
|
});
|
|
53717
|
-
const computeKeyField =
|
|
53921
|
+
const computeKeyField = computed63(() => {
|
|
53718
53922
|
return props.keyField || "_X_KEY";
|
|
53719
53923
|
});
|
|
53720
|
-
const computeIsImage =
|
|
53924
|
+
const computeIsImage = computed63(() => {
|
|
53721
53925
|
return props.mode === "image";
|
|
53722
53926
|
});
|
|
53723
|
-
const computeNameProp =
|
|
53927
|
+
const computeNameProp = computed63(() => {
|
|
53724
53928
|
return props.nameField || "name";
|
|
53725
53929
|
});
|
|
53726
|
-
const computeTypeProp =
|
|
53930
|
+
const computeTypeProp = computed63(() => {
|
|
53727
53931
|
return props.typeField || "type";
|
|
53728
53932
|
});
|
|
53729
|
-
const computeUrlProp =
|
|
53933
|
+
const computeUrlProp = computed63(() => {
|
|
53730
53934
|
return props.urlField || "url";
|
|
53731
53935
|
});
|
|
53732
|
-
const computeSizeProp =
|
|
53936
|
+
const computeSizeProp = computed63(() => {
|
|
53733
53937
|
return props.sizeField || "size";
|
|
53734
53938
|
});
|
|
53735
|
-
const computeLimitMaxSize =
|
|
53736
|
-
return
|
|
53939
|
+
const computeLimitMaxSize = computed63(() => {
|
|
53940
|
+
return XEUtils114.toNumber(props.limitSize) * 1024 * 1024;
|
|
53737
53941
|
});
|
|
53738
|
-
const computeLimitMaxCount =
|
|
53739
|
-
return props.multiple ?
|
|
53942
|
+
const computeLimitMaxCount = computed63(() => {
|
|
53943
|
+
return props.multiple ? XEUtils114.toNumber(props.limitCount) : 1;
|
|
53740
53944
|
});
|
|
53741
|
-
const computePreviewImageOpts =
|
|
53945
|
+
const computePreviewImageOpts = computed63(() => {
|
|
53742
53946
|
const { showDownloadButton } = props;
|
|
53743
53947
|
return Object.assign(
|
|
53744
53948
|
{
|
|
@@ -53748,7 +53952,7 @@ var upload_default = defineVxeComponent({
|
|
|
53748
53952
|
props.previewImageConfig
|
|
53749
53953
|
);
|
|
53750
53954
|
});
|
|
53751
|
-
const computeOverCount =
|
|
53955
|
+
const computeOverCount = computed63(() => {
|
|
53752
53956
|
const { multiple } = props;
|
|
53753
53957
|
const { fileList } = reactData;
|
|
53754
53958
|
const limitMaxCount = computeLimitMaxCount.value;
|
|
@@ -53760,8 +53964,8 @@ var upload_default = defineVxeComponent({
|
|
|
53760
53964
|
}
|
|
53761
53965
|
return fileList.length >= 1;
|
|
53762
53966
|
});
|
|
53763
|
-
const computeLimitSizeUnit =
|
|
53764
|
-
const limitSize =
|
|
53967
|
+
const computeLimitSizeUnit = computed63(() => {
|
|
53968
|
+
const limitSize = XEUtils114.toNumber(props.limitSize);
|
|
53765
53969
|
if (limitSize) {
|
|
53766
53970
|
if (limitSize > 1048576) {
|
|
53767
53971
|
return `${limitSize / 1048576}T`;
|
|
@@ -53773,13 +53977,13 @@ var upload_default = defineVxeComponent({
|
|
|
53773
53977
|
}
|
|
53774
53978
|
return "";
|
|
53775
53979
|
});
|
|
53776
|
-
const computedShowTipText =
|
|
53980
|
+
const computedShowTipText = computed63(() => {
|
|
53777
53981
|
const { showTip, tipText } = props;
|
|
53778
|
-
if (
|
|
53982
|
+
if (XEUtils114.isBoolean(showTip)) {
|
|
53779
53983
|
return showTip;
|
|
53780
53984
|
}
|
|
53781
53985
|
const defShowTip = getConfig74().upload.showTip;
|
|
53782
|
-
if (
|
|
53986
|
+
if (XEUtils114.isBoolean(defShowTip)) {
|
|
53783
53987
|
return defShowTip;
|
|
53784
53988
|
}
|
|
53785
53989
|
if (tipText) {
|
|
@@ -53787,15 +53991,15 @@ var upload_default = defineVxeComponent({
|
|
|
53787
53991
|
}
|
|
53788
53992
|
return false;
|
|
53789
53993
|
});
|
|
53790
|
-
const computedDefTipText =
|
|
53994
|
+
const computedDefTipText = computed63(() => {
|
|
53791
53995
|
const { limitSize, fileTypes, multiple, limitCount } = props;
|
|
53792
53996
|
const tipText = props.tipText || props.hintText;
|
|
53793
53997
|
const isImage = computeIsImage.value;
|
|
53794
53998
|
const limitSizeUnit = computeLimitSizeUnit.value;
|
|
53795
|
-
if (
|
|
53999
|
+
if (XEUtils114.isString(tipText)) {
|
|
53796
54000
|
return tipText;
|
|
53797
54001
|
}
|
|
53798
|
-
if (
|
|
54002
|
+
if (XEUtils114.isFunction(tipText)) {
|
|
53799
54003
|
return `${tipText({})}`;
|
|
53800
54004
|
}
|
|
53801
54005
|
const defTips = [];
|
|
@@ -53819,10 +54023,10 @@ var upload_default = defineVxeComponent({
|
|
|
53819
54023
|
}
|
|
53820
54024
|
return defTips.join(getI18n29("vxe.base.comma"));
|
|
53821
54025
|
});
|
|
53822
|
-
const computeImageOpts =
|
|
54026
|
+
const computeImageOpts = computed63(() => {
|
|
53823
54027
|
return Object.assign({}, props.imageConfig || props.imageStyle);
|
|
53824
54028
|
});
|
|
53825
|
-
const computeImgStyle =
|
|
54029
|
+
const computeImgStyle = computed63(() => {
|
|
53826
54030
|
const imageOpts = computeImageOpts.value;
|
|
53827
54031
|
const { width, height } = imageOpts;
|
|
53828
54032
|
const stys = {};
|
|
@@ -53834,7 +54038,7 @@ var upload_default = defineVxeComponent({
|
|
|
53834
54038
|
}
|
|
53835
54039
|
return stys;
|
|
53836
54040
|
});
|
|
53837
|
-
const computeMoreOpts =
|
|
54041
|
+
const computeMoreOpts = computed63(() => {
|
|
53838
54042
|
return Object.assign({ showMoreButton: true }, props.moreConfig);
|
|
53839
54043
|
});
|
|
53840
54044
|
const computeMaps = {
|
|
@@ -53850,7 +54054,7 @@ var upload_default = defineVxeComponent({
|
|
|
53850
54054
|
getComputeMaps: () => computeMaps
|
|
53851
54055
|
};
|
|
53852
54056
|
const getUniqueKey = () => {
|
|
53853
|
-
return
|
|
54057
|
+
return XEUtils114.uniqueId();
|
|
53854
54058
|
};
|
|
53855
54059
|
const getFieldKey = (item) => {
|
|
53856
54060
|
const keyField = computeKeyField.value;
|
|
@@ -53864,16 +54068,16 @@ var upload_default = defineVxeComponent({
|
|
|
53864
54068
|
const typeProp = computeTypeProp.value;
|
|
53865
54069
|
const urlProp = computeUrlProp.value;
|
|
53866
54070
|
const sizeProp = computeSizeProp.value;
|
|
53867
|
-
const fileList = modelValue ? (modelValue ?
|
|
53868
|
-
if (!item ||
|
|
54071
|
+
const fileList = modelValue ? (modelValue ? XEUtils114.isArray(modelValue) ? modelValue : [modelValue] : []).map((item) => {
|
|
54072
|
+
if (!item || XEUtils114.isString(item)) {
|
|
53869
54073
|
const url = `${item || ""}`;
|
|
53870
|
-
const urlObj =
|
|
54074
|
+
const urlObj = XEUtils114.parseUrl(item);
|
|
53871
54075
|
const name2 = (urlObj ? urlObj.searchQuery[nameProp] : "") || parseFileName(url);
|
|
53872
54076
|
return {
|
|
53873
54077
|
[nameProp]: name2,
|
|
53874
54078
|
[typeProp]: (urlObj ? urlObj.searchQuery[typeProp] : "") || parseFileType(name2),
|
|
53875
54079
|
[urlProp]: url,
|
|
53876
|
-
[sizeProp]:
|
|
54080
|
+
[sizeProp]: XEUtils114.toNumber(urlObj ? urlObj.searchQuery[sizeProp] : 0) || 0,
|
|
53877
54081
|
[keyField]: getUniqueKey()
|
|
53878
54082
|
};
|
|
53879
54083
|
}
|
|
@@ -53898,7 +54102,7 @@ var upload_default = defineVxeComponent({
|
|
|
53898
54102
|
return "";
|
|
53899
54103
|
};
|
|
53900
54104
|
const dispatchEvent = (type, params, evnt) => {
|
|
53901
|
-
emit(type,
|
|
54105
|
+
emit(type, createEvent83(evnt, { $upload: $xeUpload }, params));
|
|
53902
54106
|
};
|
|
53903
54107
|
const emitModel = (value) => {
|
|
53904
54108
|
emit("update:modelValue", value);
|
|
@@ -53912,7 +54116,7 @@ var upload_default = defineVxeComponent({
|
|
|
53912
54116
|
restList = restList.map((item) => {
|
|
53913
54117
|
const url = item[urlProp];
|
|
53914
54118
|
if (url && urlArgs) {
|
|
53915
|
-
const urlObj =
|
|
54119
|
+
const urlObj = XEUtils114.parseUrl(url);
|
|
53916
54120
|
if (!urlObj.searchQuery[nameProp]) {
|
|
53917
54121
|
if (url.indexOf("blob:") === -1) {
|
|
53918
54122
|
return `${url}${url.indexOf("?") === -1 ? "?" : "&"}${nameProp}=${encodeURIComponent(item[nameProp] || "")}`;
|
|
@@ -53956,8 +54160,8 @@ var upload_default = defineVxeComponent({
|
|
|
53956
54160
|
const beforeDownloadFn = props.beforeDownloadMethod || getConfig74().upload.beforeDownloadMethod;
|
|
53957
54161
|
const { imagePreviewTypes } = internalData;
|
|
53958
54162
|
if (imagePreviewTypes.concat(imageTypes || []).some((type) => `${type}`.toLowerCase() === `${item[typeProp]}`.toLowerCase())) {
|
|
53959
|
-
if (
|
|
53960
|
-
|
|
54163
|
+
if (VxeUI189.previewImage) {
|
|
54164
|
+
VxeUI189.previewImage({
|
|
53961
54165
|
...previewImageOpts,
|
|
53962
54166
|
urlList: [getFileUrl(item)],
|
|
53963
54167
|
showDownloadButton,
|
|
@@ -53996,8 +54200,8 @@ var upload_default = defineVxeComponent({
|
|
|
53996
54200
|
$upload: $xeUpload,
|
|
53997
54201
|
option: item
|
|
53998
54202
|
});
|
|
53999
|
-
} else if (
|
|
54000
|
-
|
|
54203
|
+
} else if (VxeUI189.previewImage) {
|
|
54204
|
+
VxeUI189.previewImage({
|
|
54001
54205
|
...previewImageOpts,
|
|
54002
54206
|
urlList: fileList.map((item2) => getFileUrl(item2)),
|
|
54003
54207
|
activeIndex: index,
|
|
@@ -54027,7 +54231,7 @@ var upload_default = defineVxeComponent({
|
|
|
54027
54231
|
const { fileCacheMaps } = reactData;
|
|
54028
54232
|
const cacheItem = fileCacheMaps[getFieldKey(item)];
|
|
54029
54233
|
if (cacheItem) {
|
|
54030
|
-
cacheItem.percent = Math.max(0, Math.min(99,
|
|
54234
|
+
cacheItem.percent = Math.max(0, Math.min(99, XEUtils114.toNumber(percentNum)));
|
|
54031
54235
|
}
|
|
54032
54236
|
}
|
|
54033
54237
|
})
|
|
@@ -54113,11 +54317,11 @@ var upload_default = defineVxeComponent({
|
|
|
54113
54317
|
let selectFiles = files;
|
|
54114
54318
|
if (multiple && limitMaxCount) {
|
|
54115
54319
|
if (showLimitCount && fileList.length >= limitMaxCount) {
|
|
54116
|
-
if (
|
|
54117
|
-
|
|
54320
|
+
if (VxeUI189.modal) {
|
|
54321
|
+
VxeUI189.modal.notification({
|
|
54118
54322
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54119
54323
|
status: "error",
|
|
54120
|
-
content: limitCountText ? `${
|
|
54324
|
+
content: limitCountText ? `${XEUtils114.isFunction(limitCountText) ? limitCountText({ maxCount: limitMaxCount }) : limitCountText}` : getI18n29("vxe.upload.overCountErr", [limitMaxCount])
|
|
54121
54325
|
});
|
|
54122
54326
|
}
|
|
54123
54327
|
return;
|
|
@@ -54126,13 +54330,13 @@ var upload_default = defineVxeComponent({
|
|
|
54126
54330
|
if (showLimitCount && overNum > 0) {
|
|
54127
54331
|
const overExtraList = selectFiles.slice(limitMaxCount - fileList.length);
|
|
54128
54332
|
if (limitCountText) {
|
|
54129
|
-
|
|
54333
|
+
VxeUI189.modal.notification({
|
|
54130
54334
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54131
54335
|
status: "error",
|
|
54132
|
-
content: `${
|
|
54336
|
+
content: `${XEUtils114.isFunction(limitCountText) ? limitCountText({ maxCount: limitMaxCount }) : limitCountText}`
|
|
54133
54337
|
});
|
|
54134
|
-
} else if (
|
|
54135
|
-
|
|
54338
|
+
} else if (VxeUI189.modal) {
|
|
54339
|
+
VxeUI189.modal.notification({
|
|
54136
54340
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54137
54341
|
status: "error",
|
|
54138
54342
|
width: null,
|
|
@@ -54174,11 +54378,11 @@ var upload_default = defineVxeComponent({
|
|
|
54174
54378
|
for (let i = 0; i < files.length; i++) {
|
|
54175
54379
|
const file = files[0];
|
|
54176
54380
|
if (file.size > limitMaxSize) {
|
|
54177
|
-
if (
|
|
54178
|
-
|
|
54381
|
+
if (VxeUI189.modal) {
|
|
54382
|
+
VxeUI189.modal.notification({
|
|
54179
54383
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54180
54384
|
status: "error",
|
|
54181
|
-
content: limitSizeText ? `${
|
|
54385
|
+
content: limitSizeText ? `${XEUtils114.isFunction(limitSizeText) ? limitSizeText({ maxSize: limitMaxSize }) : limitSizeText}` : getI18n29("vxe.upload.overSizeErr", [limitSizeUnit])
|
|
54182
54386
|
});
|
|
54183
54387
|
}
|
|
54184
54388
|
return;
|
|
@@ -54209,7 +54413,7 @@ var upload_default = defineVxeComponent({
|
|
|
54209
54413
|
response: null
|
|
54210
54414
|
};
|
|
54211
54415
|
}
|
|
54212
|
-
const item =
|
|
54416
|
+
const item = reactive87(fileObj);
|
|
54213
54417
|
if (!beforeSelectFn || beforeSelectFn({ $upload: $xeUpload, file })) {
|
|
54214
54418
|
if (uploadFn && autoSubmit) {
|
|
54215
54419
|
uploadPromiseRests.push(handleUploadResult(item, file));
|
|
@@ -54379,8 +54583,8 @@ var upload_default = defineVxeComponent({
|
|
|
54379
54583
|
}
|
|
54380
54584
|
});
|
|
54381
54585
|
if (errTypes.length) {
|
|
54382
|
-
if (
|
|
54383
|
-
|
|
54586
|
+
if (VxeUI189.modal) {
|
|
54587
|
+
VxeUI189.modal.message({
|
|
54384
54588
|
content: getI18n29("vxe.error.notType", [errTypes.join(", ")]),
|
|
54385
54589
|
status: "error"
|
|
54386
54590
|
});
|
|
@@ -54390,8 +54594,8 @@ var upload_default = defineVxeComponent({
|
|
|
54390
54594
|
}
|
|
54391
54595
|
}
|
|
54392
54596
|
if (!files.length) {
|
|
54393
|
-
if (
|
|
54394
|
-
|
|
54597
|
+
if (VxeUI189.modal) {
|
|
54598
|
+
VxeUI189.modal.notification({
|
|
54395
54599
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54396
54600
|
status: "error",
|
|
54397
54601
|
content: getI18n29("vxe.upload.uploadTypeErr")
|
|
@@ -54417,7 +54621,7 @@ var upload_default = defineVxeComponent({
|
|
|
54417
54621
|
};
|
|
54418
54622
|
const handleTransferFiles = (items) => {
|
|
54419
54623
|
const files = [];
|
|
54420
|
-
|
|
54624
|
+
XEUtils114.arrayEach(items, (item) => {
|
|
54421
54625
|
const file = item.getAsFile();
|
|
54422
54626
|
if (file) {
|
|
54423
54627
|
files.push(file);
|
|
@@ -54429,8 +54633,8 @@ var upload_default = defineVxeComponent({
|
|
|
54429
54633
|
const formReadonly = computeFormReadonly.value;
|
|
54430
54634
|
const isImage = computeIsImage.value;
|
|
54431
54635
|
const evnt = evntParams.$event;
|
|
54432
|
-
if (
|
|
54433
|
-
|
|
54636
|
+
if (VxeUI189.modal) {
|
|
54637
|
+
VxeUI189.modal.open({
|
|
54434
54638
|
id: internalData.moreId,
|
|
54435
54639
|
title: formReadonly ? getI18n29("vxe.upload.morePopup.readTitle") : getI18n29(`vxe.upload.morePopup.${isImage ? "imageTitle" : "fileTitle"}`),
|
|
54436
54640
|
width: 660,
|
|
@@ -54580,7 +54784,7 @@ var upload_default = defineVxeComponent({
|
|
|
54580
54784
|
}
|
|
54581
54785
|
const dragEl = evnt.currentTarget;
|
|
54582
54786
|
const parentEl = dragEl.parentElement;
|
|
54583
|
-
const dragIndex =
|
|
54787
|
+
const dragIndex = XEUtils114.findIndexOf(Array.from(parentEl.children), (item) => dragEl === item);
|
|
54584
54788
|
reactData.isDragMove = true;
|
|
54585
54789
|
reactData.dragIndex = dragIndex;
|
|
54586
54790
|
setTimeout(() => {
|
|
@@ -54597,7 +54801,7 @@ var upload_default = defineVxeComponent({
|
|
|
54597
54801
|
const isImage = computeIsImage.value;
|
|
54598
54802
|
const dragEl = evnt.currentTarget;
|
|
54599
54803
|
const parentEl = dragEl.parentElement;
|
|
54600
|
-
const currIndex =
|
|
54804
|
+
const currIndex = XEUtils114.findIndexOf(Array.from(parentEl.children), (item) => dragEl === item);
|
|
54601
54805
|
let dragPos = "";
|
|
54602
54806
|
if (isImage) {
|
|
54603
54807
|
const offsetX = evnt.clientX - dragEl.getBoundingClientRect().x;
|
|
@@ -54624,7 +54828,7 @@ var upload_default = defineVxeComponent({
|
|
|
54624
54828
|
const newItem = fileList[targetIndex];
|
|
54625
54829
|
if (oldItem && newItem) {
|
|
54626
54830
|
fileList.splice(oldIndex, 1);
|
|
54627
|
-
const ptfIndex =
|
|
54831
|
+
const ptfIndex = XEUtils114.findIndexOf(fileList, (item) => newItem === item);
|
|
54628
54832
|
const nIndex = ptfIndex + dragOffsetIndex;
|
|
54629
54833
|
fileList.splice(nIndex, 0, oldItem);
|
|
54630
54834
|
dispatchEvent(
|
|
@@ -54689,7 +54893,7 @@ var upload_default = defineVxeComponent({
|
|
|
54689
54893
|
const { fileList } = reactData;
|
|
54690
54894
|
const urlProp = computeUrlProp.value;
|
|
54691
54895
|
const rest = [];
|
|
54692
|
-
|
|
54896
|
+
XEUtils114.lastEach(fileList, (item, index) => {
|
|
54693
54897
|
rest.push(
|
|
54694
54898
|
removeFileEvent(evnt, item, index).then((status) => {
|
|
54695
54899
|
return { url: item[urlProp], status };
|
|
@@ -54701,12 +54905,12 @@ var upload_default = defineVxeComponent({
|
|
|
54701
54905
|
const handleRemoveFile = (evnt, urlOrItem) => {
|
|
54702
54906
|
const { fileList } = reactData;
|
|
54703
54907
|
const urlProp = computeUrlProp.value;
|
|
54704
|
-
const urls =
|
|
54908
|
+
const urls = XEUtils114.isArray(urlOrItem) ? urlOrItem : [urlOrItem];
|
|
54705
54909
|
const rest = [];
|
|
54706
54910
|
urls.forEach((obj) => {
|
|
54707
54911
|
if (obj) {
|
|
54708
|
-
const url =
|
|
54709
|
-
const index =
|
|
54912
|
+
const url = XEUtils114.isString(obj) ? obj : obj[urlProp];
|
|
54913
|
+
const index = XEUtils114.findIndexOf(fileList, (fileItem) => fileItem[urlProp] === url);
|
|
54710
54914
|
if (index > -1) {
|
|
54711
54915
|
rest.push(
|
|
54712
54916
|
removeFileEvent(evnt, fileList[index], index).then((status) => {
|
|
@@ -54743,7 +54947,7 @@ var upload_default = defineVxeComponent({
|
|
|
54743
54947
|
},
|
|
54744
54948
|
submit(isFull) {
|
|
54745
54949
|
const { maxSimultaneousUploads } = props;
|
|
54746
|
-
const msNum =
|
|
54950
|
+
const msNum = XEUtils114.toNumber(maxSimultaneousUploads || 1) || 1;
|
|
54747
54951
|
const { fileList, fileCacheMaps } = reactData;
|
|
54748
54952
|
const allPendingList = fileList.filter((item) => {
|
|
54749
54953
|
const fileKey = getFieldKey(item);
|
|
@@ -54786,8 +54990,8 @@ var upload_default = defineVxeComponent({
|
|
|
54786
54990
|
return nextTick36();
|
|
54787
54991
|
},
|
|
54788
54992
|
closeMore() {
|
|
54789
|
-
if (
|
|
54790
|
-
|
|
54993
|
+
if (VxeUI189.modal) {
|
|
54994
|
+
VxeUI189.modal.close(internalData.moreId);
|
|
54791
54995
|
}
|
|
54792
54996
|
return nextTick36();
|
|
54793
54997
|
},
|
|
@@ -54889,7 +55093,7 @@ var upload_default = defineVxeComponent({
|
|
|
54889
55093
|
{
|
|
54890
55094
|
class: "vxe-upload--file-item-loading-text"
|
|
54891
55095
|
},
|
|
54892
|
-
progressText ?
|
|
55096
|
+
progressText ? XEUtils114.toFormatString(`${XEUtils114.isFunction(progressText) ? progressText({}) : progressText}`, { percent: cacheItem.percent }) : getI18n29("vxe.upload.uploadProgress", [cacheItem.percent])
|
|
54893
55097
|
) : renderEmptyElement60($xeUpload),
|
|
54894
55098
|
!isLoading && (isError && showErrorStatus || isPending && showSubmitButton && !autoSubmit) ? h95(
|
|
54895
55099
|
"div",
|
|
@@ -54983,7 +55187,7 @@ var upload_default = defineVxeComponent({
|
|
|
54983
55187
|
defaultSlot ? getSlotVNs(defaultSlot({ isMoreView, options: fileList, $upload: $xeUpload })) : [
|
|
54984
55188
|
h95(button_default2, {
|
|
54985
55189
|
class: "vxe-upload--file-action-button",
|
|
54986
|
-
content: isMoreView || showButtonText ? buttonText ? `${
|
|
55190
|
+
content: isMoreView || showButtonText ? buttonText ? `${XEUtils114.isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n29("vxe.upload.fileBtnText") : "",
|
|
54987
55191
|
icon: showButtonIcon ? buttonIcon || getIcon37().UPLOAD_FILE_ADD : "",
|
|
54988
55192
|
disabled: isDisabled
|
|
54989
55193
|
})
|
|
@@ -55010,7 +55214,7 @@ var upload_default = defineVxeComponent({
|
|
|
55010
55214
|
let overMaxNum = 0;
|
|
55011
55215
|
let isMoreMax = false;
|
|
55012
55216
|
let isMiniMore = false;
|
|
55013
|
-
if (
|
|
55217
|
+
if (XEUtils114.isNumber(maxCount) && fileList.length > maxCount) {
|
|
55014
55218
|
isMoreMax = true;
|
|
55015
55219
|
isMiniMore = maxCount === 0;
|
|
55016
55220
|
overMaxNum = fileList.length - maxCount;
|
|
@@ -55060,7 +55264,7 @@ var upload_default = defineVxeComponent({
|
|
|
55060
55264
|
moreBtnSlot ? getSlotVNs(moreBtnSlot({ options: fileList })) : [
|
|
55061
55265
|
h95(button_default2, {
|
|
55062
55266
|
mode: "text",
|
|
55063
|
-
content: moreButtonText ?
|
|
55267
|
+
content: moreButtonText ? XEUtils114.isFunction(moreButtonText) ? moreButtonText({ $upload: $xeUpload, options: fileList }) : XEUtils114.toFormatString(moreButtonText, [fileList.length]) : getI18n29(isMoreMax && isMiniMore ? "vxe.upload.moreFileBtnText" : "vxe.upload.moreBtnText", [fileList.length]),
|
|
55064
55268
|
status: "primary",
|
|
55065
55269
|
onClick: handleMoreEvent
|
|
55066
55270
|
})
|
|
@@ -55154,7 +55358,7 @@ var upload_default = defineVxeComponent({
|
|
|
55154
55358
|
{
|
|
55155
55359
|
class: "vxe-upload--image-item-loading-text"
|
|
55156
55360
|
},
|
|
55157
|
-
progressText ?
|
|
55361
|
+
progressText ? XEUtils114.toFormatString(`${XEUtils114.isFunction(progressText) ? progressText({}) : progressText}`, { percent: cacheItem.percent }) : getI18n29("vxe.upload.uploadProgress", [cacheItem.percent])
|
|
55158
55362
|
) : renderEmptyElement60($xeUpload)
|
|
55159
55363
|
]
|
|
55160
55364
|
) : renderEmptyElement60($xeUpload),
|
|
@@ -55277,7 +55481,7 @@ var upload_default = defineVxeComponent({
|
|
|
55277
55481
|
{
|
|
55278
55482
|
class: "vxe-upload--image-action-content"
|
|
55279
55483
|
},
|
|
55280
|
-
buttonText ? `${
|
|
55484
|
+
buttonText ? `${XEUtils114.isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n29("vxe.upload.imgBtnText")
|
|
55281
55485
|
) : renderEmptyElement60($xeUpload),
|
|
55282
55486
|
showTipText && (defTipText || tipSlot) ? h95(
|
|
55283
55487
|
"div",
|
|
@@ -55303,7 +55507,7 @@ var upload_default = defineVxeComponent({
|
|
|
55303
55507
|
let overMaxNum = 0;
|
|
55304
55508
|
let isMoreMax = false;
|
|
55305
55509
|
let isMiniMore = false;
|
|
55306
|
-
if (
|
|
55510
|
+
if (XEUtils114.isNumber(maxCount) && fileList.length > maxCount) {
|
|
55307
55511
|
isMoreMax = true;
|
|
55308
55512
|
isMiniMore = maxCount === 0;
|
|
55309
55513
|
overMaxNum = fileList.length - maxCount;
|
|
@@ -55334,7 +55538,7 @@ var upload_default = defineVxeComponent({
|
|
|
55334
55538
|
moreBtnSlot ? getSlotVNs(moreBtnSlot({ options: fileList })) : [
|
|
55335
55539
|
h95(button_default2, {
|
|
55336
55540
|
mode: "text",
|
|
55337
|
-
content: moreButtonText ?
|
|
55541
|
+
content: moreButtonText ? XEUtils114.isFunction(moreButtonText) ? moreButtonText({ $upload: $xeUpload, options: fileList }) : XEUtils114.toFormatString(moreButtonText, [fileList.length]) : getI18n29(isMoreMax && isMiniMore ? "vxe.upload.moreImgBtnText" : "vxe.upload.moreBtnText", [fileList.length]),
|
|
55338
55542
|
status: "primary",
|
|
55339
55543
|
onClick: handleMoreEvent
|
|
55340
55544
|
})
|
|
@@ -55357,7 +55561,7 @@ var upload_default = defineVxeComponent({
|
|
|
55357
55561
|
moreBtnSlot ? getSlotVNs(moreBtnSlot({ options: fileList })) : [
|
|
55358
55562
|
h95(button_default2, {
|
|
55359
55563
|
mode: "text",
|
|
55360
|
-
content: moreButtonText ?
|
|
55564
|
+
content: moreButtonText ? XEUtils114.isFunction(moreButtonText) ? moreButtonText({ $upload: $xeUpload, options: fileList }) : XEUtils114.toFormatString(moreButtonText, [fileList.length]) : getI18n29(isMoreMax && isMiniMore ? "vxe.upload.moreImgBtnText" : "vxe.upload.moreBtnText", [fileList.length]),
|
|
55361
55565
|
status: "primary",
|
|
55362
55566
|
onClick: handleMoreEvent
|
|
55363
55567
|
})
|
|
@@ -55427,22 +55631,22 @@ var upload_default = defineVxeComponent({
|
|
|
55427
55631
|
);
|
|
55428
55632
|
};
|
|
55429
55633
|
const listFlag = ref81(0);
|
|
55430
|
-
|
|
55634
|
+
watch51(
|
|
55431
55635
|
() => props.modelValue ? props.modelValue.length : 0,
|
|
55432
55636
|
() => {
|
|
55433
55637
|
listFlag.value++;
|
|
55434
55638
|
}
|
|
55435
55639
|
);
|
|
55436
|
-
|
|
55640
|
+
watch51(
|
|
55437
55641
|
() => props.modelValue,
|
|
55438
55642
|
() => {
|
|
55439
55643
|
listFlag.value++;
|
|
55440
55644
|
}
|
|
55441
55645
|
);
|
|
55442
|
-
|
|
55646
|
+
watch51(listFlag, () => {
|
|
55443
55647
|
updateFileList();
|
|
55444
55648
|
});
|
|
55445
|
-
|
|
55649
|
+
onMounted55(() => {
|
|
55446
55650
|
if (props.multiple && props.singleMode) {
|
|
55447
55651
|
errLog23("vxe.error.errConflicts", ["multiple", "single-mode"]);
|
|
55448
55652
|
}
|
|
@@ -55456,13 +55660,13 @@ var upload_default = defineVxeComponent({
|
|
|
55456
55660
|
globalEvents27.on($xeUpload, "click", handleGlobalClickEvent);
|
|
55457
55661
|
globalEvents27.on($xeUpload, "blur", handleGlobalBlurEvent);
|
|
55458
55662
|
});
|
|
55459
|
-
|
|
55663
|
+
onBeforeUnmount25(() => {
|
|
55460
55664
|
reactData.isDragUploadStatus = false;
|
|
55461
55665
|
globalEvents27.off($xeUpload, "paste");
|
|
55462
55666
|
globalEvents27.off($xeUpload, "click");
|
|
55463
55667
|
globalEvents27.off($xeUpload, "blur");
|
|
55464
|
-
|
|
55465
|
-
|
|
55668
|
+
XEUtils114.assign(reactData, createReactData28());
|
|
55669
|
+
XEUtils114.assign(internalData, createInternalData27());
|
|
55466
55670
|
});
|
|
55467
55671
|
updateFileList();
|
|
55468
55672
|
$xeUpload.renderVN = renderVN;
|
|
@@ -55474,29 +55678,29 @@ var upload_default = defineVxeComponent({
|
|
|
55474
55678
|
});
|
|
55475
55679
|
|
|
55476
55680
|
// packages_temp/upload/index.ts
|
|
55477
|
-
import { VxeUI as
|
|
55681
|
+
import { VxeUI as VxeUI190 } from "@vxe-ui/core";
|
|
55478
55682
|
var VxeUpload = Object.assign({}, upload_default, {
|
|
55479
55683
|
install(app) {
|
|
55480
55684
|
app.component(upload_default.name, upload_default);
|
|
55481
55685
|
}
|
|
55482
55686
|
});
|
|
55483
55687
|
dynamicApp.use(VxeUpload);
|
|
55484
|
-
|
|
55485
|
-
|
|
55486
|
-
|
|
55688
|
+
VxeUI190.component(upload_default);
|
|
55689
|
+
VxeUI190.saveFile = saveLocalFile;
|
|
55690
|
+
VxeUI190.readFile = readLocalFile;
|
|
55487
55691
|
var Upload = VxeUpload;
|
|
55488
55692
|
var upload_default2 = VxeUpload;
|
|
55489
55693
|
|
|
55490
55694
|
// packages_temp/watermark/index.ts
|
|
55491
|
-
import { VxeUI as
|
|
55695
|
+
import { VxeUI as VxeUI192 } from "@vxe-ui/core";
|
|
55492
55696
|
|
|
55493
55697
|
// packages_temp/watermark/src/watermark.ts
|
|
55494
|
-
import { ref as ref82, h as h96, reactive as
|
|
55495
|
-
import
|
|
55496
|
-
import { VxeUI as
|
|
55698
|
+
import { ref as ref82, h as h96, reactive as reactive88, computed as computed64, onMounted as onMounted56, watch as watch52, onUnmounted as onUnmounted32 } from "vue";
|
|
55699
|
+
import XEUtils116 from "xe-utils";
|
|
55700
|
+
import { VxeUI as VxeUI191 } from "@vxe-ui/core";
|
|
55497
55701
|
|
|
55498
55702
|
// packages_temp/watermark/src/util.ts
|
|
55499
|
-
import
|
|
55703
|
+
import XEUtils115 from "xe-utils";
|
|
55500
55704
|
var canvasEl = null;
|
|
55501
55705
|
var fontEl = null;
|
|
55502
55706
|
var fontCacheMaps = {};
|
|
@@ -55554,16 +55758,16 @@ function getFontConf(item, key, opts) {
|
|
|
55554
55758
|
}
|
|
55555
55759
|
function createMarkFont(contConf, defaultFontSize, opts) {
|
|
55556
55760
|
const { offset } = opts;
|
|
55557
|
-
const text =
|
|
55558
|
-
const fontSize =
|
|
55559
|
-
const [offsetX = 0, offsetY = 0] = offset ?
|
|
55761
|
+
const text = XEUtils115.toValueString(contConf.textContent);
|
|
55762
|
+
const fontSize = XEUtils115.toNumber(getFontConf(contConf, "fontSize", opts) || defaultFontSize) || 14;
|
|
55763
|
+
const [offsetX = 0, offsetY = 0] = offset ? XEUtils115.isArray(offset) ? offset : [offset, offset] : [];
|
|
55560
55764
|
const { width, height } = calcFontWH(text, fontSize);
|
|
55561
55765
|
return {
|
|
55562
55766
|
text,
|
|
55563
55767
|
fontSize,
|
|
55564
55768
|
font: contConf.font,
|
|
55565
|
-
width: width +
|
|
55566
|
-
height: height +
|
|
55769
|
+
width: width + XEUtils115.toNumber(offsetX),
|
|
55770
|
+
height: height + XEUtils115.toNumber(offsetY)
|
|
55567
55771
|
};
|
|
55568
55772
|
}
|
|
55569
55773
|
function drayFont(ctx, item, opts) {
|
|
@@ -55574,8 +55778,8 @@ function drayFont(ctx, item, opts) {
|
|
|
55574
55778
|
function getContentUrl(content, defaultFontSize, options) {
|
|
55575
55779
|
const opts = Object.assign({}, options);
|
|
55576
55780
|
const { rotate } = opts;
|
|
55577
|
-
const deg =
|
|
55578
|
-
const contList = (
|
|
55781
|
+
const deg = XEUtils115.toNumber(rotate);
|
|
55782
|
+
const contList = (XEUtils115.isArray(content) ? content : [content]).map((item) => {
|
|
55579
55783
|
if (item) {
|
|
55580
55784
|
if (item.textContent) {
|
|
55581
55785
|
return createMarkFont(item, defaultFontSize, opts);
|
|
@@ -55605,9 +55809,9 @@ function getContentUrl(content, defaultFontSize, options) {
|
|
|
55605
55809
|
const ctx = canvasEl2.getContext("2d");
|
|
55606
55810
|
if (ctx && contList.length) {
|
|
55607
55811
|
const { gap } = opts;
|
|
55608
|
-
const gapList = gap ?
|
|
55609
|
-
const gapX =
|
|
55610
|
-
const gapY =
|
|
55812
|
+
const gapList = gap ? XEUtils115.isArray(gap) ? gap : [gap, gap] : [];
|
|
55813
|
+
const gapX = XEUtils115.toNumber(gapList[0]);
|
|
55814
|
+
const gapY = XEUtils115.toNumber(gapList[1]);
|
|
55611
55815
|
const { contentWidth } = calcContentWH(contList);
|
|
55612
55816
|
const canvasWidth = contentWidth * 2 + gapX * 2 + gapX / 2;
|
|
55613
55817
|
const canvasHeight = contentWidth * 2 + gapY;
|
|
@@ -55648,7 +55852,7 @@ function getContentUrl(content, defaultFontSize, options) {
|
|
|
55648
55852
|
}
|
|
55649
55853
|
|
|
55650
55854
|
// packages_temp/watermark/src/watermark.ts
|
|
55651
|
-
var { getConfig: getConfig75, createEvent:
|
|
55855
|
+
var { getConfig: getConfig75, createEvent: createEvent84, globalEvents: globalEvents28 } = VxeUI191;
|
|
55652
55856
|
var watermark_default = defineVxeComponent({
|
|
55653
55857
|
name: "VxeWatermark",
|
|
55654
55858
|
props: {
|
|
@@ -55661,7 +55865,7 @@ var watermark_default = defineVxeComponent({
|
|
|
55661
55865
|
},
|
|
55662
55866
|
gap: {
|
|
55663
55867
|
type: [Array, Number, String],
|
|
55664
|
-
default: () =>
|
|
55868
|
+
default: () => XEUtils116.clone(getConfig75().watermark.gap, true)
|
|
55665
55869
|
},
|
|
55666
55870
|
content: [String, Array],
|
|
55667
55871
|
font: Object,
|
|
@@ -55671,18 +55875,18 @@ var watermark_default = defineVxeComponent({
|
|
|
55671
55875
|
emits: [],
|
|
55672
55876
|
setup(props, context) {
|
|
55673
55877
|
const { emit } = context;
|
|
55674
|
-
const xID =
|
|
55878
|
+
const xID = XEUtils116.uniqueId();
|
|
55675
55879
|
const refElem = ref82();
|
|
55676
|
-
const reactData =
|
|
55880
|
+
const reactData = reactive88({
|
|
55677
55881
|
markUrl: ""
|
|
55678
55882
|
});
|
|
55679
55883
|
const refMaps = {
|
|
55680
55884
|
refElem
|
|
55681
55885
|
};
|
|
55682
|
-
const computeFontOpts =
|
|
55683
|
-
return
|
|
55886
|
+
const computeFontOpts = computed64(() => {
|
|
55887
|
+
return XEUtils116.assign({}, XEUtils116.clone(getConfig75().watermark.font, true), props.font);
|
|
55684
55888
|
});
|
|
55685
|
-
const computeWrapperStyle =
|
|
55889
|
+
const computeWrapperStyle = computed64(() => {
|
|
55686
55890
|
const { width, height, zIndex: zIndex2 } = props;
|
|
55687
55891
|
const { markUrl } = reactData;
|
|
55688
55892
|
const stys = {};
|
|
@@ -55710,7 +55914,7 @@ var watermark_default = defineVxeComponent({
|
|
|
55710
55914
|
getComputeMaps: () => computeMaps
|
|
55711
55915
|
};
|
|
55712
55916
|
const dispatchEvent = (type, params, evnt) => {
|
|
55713
|
-
emit(type,
|
|
55917
|
+
emit(type, createEvent84(evnt, { $watermark: $xeWatermark }, params));
|
|
55714
55918
|
};
|
|
55715
55919
|
const watermarkMethods = {
|
|
55716
55920
|
dispatchEvent
|
|
@@ -55742,54 +55946,54 @@ var watermark_default = defineVxeComponent({
|
|
|
55742
55946
|
style: wrapperStyle
|
|
55743
55947
|
});
|
|
55744
55948
|
};
|
|
55745
|
-
|
|
55949
|
+
watch52(
|
|
55746
55950
|
() => props.imageUrl,
|
|
55747
55951
|
() => {
|
|
55748
55952
|
updateMarkStyle();
|
|
55749
55953
|
}
|
|
55750
55954
|
);
|
|
55751
|
-
|
|
55955
|
+
watch52(
|
|
55752
55956
|
() => props.content,
|
|
55753
55957
|
() => {
|
|
55754
55958
|
updateMarkStyle();
|
|
55755
55959
|
}
|
|
55756
55960
|
);
|
|
55757
|
-
|
|
55961
|
+
watch52(
|
|
55758
55962
|
() => props.gap,
|
|
55759
55963
|
() => {
|
|
55760
55964
|
updateMarkStyle();
|
|
55761
55965
|
}
|
|
55762
55966
|
);
|
|
55763
|
-
|
|
55967
|
+
watch52(
|
|
55764
55968
|
() => props.rotate,
|
|
55765
55969
|
() => {
|
|
55766
55970
|
updateMarkStyle();
|
|
55767
55971
|
}
|
|
55768
55972
|
);
|
|
55769
|
-
|
|
55973
|
+
watch52(
|
|
55770
55974
|
() => props.width,
|
|
55771
55975
|
() => {
|
|
55772
55976
|
updateMarkStyle();
|
|
55773
55977
|
}
|
|
55774
55978
|
);
|
|
55775
|
-
|
|
55979
|
+
watch52(
|
|
55776
55980
|
() => props.height,
|
|
55777
55981
|
() => {
|
|
55778
55982
|
updateMarkStyle();
|
|
55779
55983
|
}
|
|
55780
55984
|
);
|
|
55781
|
-
|
|
55985
|
+
watch52(
|
|
55782
55986
|
() => props.font,
|
|
55783
55987
|
() => {
|
|
55784
55988
|
updateMarkStyle();
|
|
55785
55989
|
}
|
|
55786
55990
|
);
|
|
55787
|
-
|
|
55991
|
+
onMounted56(() => {
|
|
55788
55992
|
updateMarkStyle();
|
|
55789
55993
|
globalEvents28.on(
|
|
55790
55994
|
$xeWatermark,
|
|
55791
55995
|
"resize",
|
|
55792
|
-
|
|
55996
|
+
XEUtils116.throttle(
|
|
55793
55997
|
() => {
|
|
55794
55998
|
updateMarkStyle();
|
|
55795
55999
|
},
|
|
@@ -55798,7 +56002,7 @@ var watermark_default = defineVxeComponent({
|
|
|
55798
56002
|
)
|
|
55799
56003
|
);
|
|
55800
56004
|
});
|
|
55801
|
-
|
|
56005
|
+
onUnmounted32(() => {
|
|
55802
56006
|
globalEvents28.off($xeWatermark, "resize");
|
|
55803
56007
|
});
|
|
55804
56008
|
$xeWatermark.renderVN = renderVN;
|
|
@@ -55816,7 +56020,7 @@ var VxeWatermark = Object.assign({}, watermark_default, {
|
|
|
55816
56020
|
}
|
|
55817
56021
|
});
|
|
55818
56022
|
dynamicApp.use(VxeWatermark);
|
|
55819
|
-
|
|
56023
|
+
VxeUI192.component(watermark_default);
|
|
55820
56024
|
var WatermarkController = {
|
|
55821
56025
|
load(options) {
|
|
55822
56026
|
checkDynamic();
|
|
@@ -55830,14 +56034,14 @@ var WatermarkController = {
|
|
|
55830
56034
|
return Promise.resolve();
|
|
55831
56035
|
}
|
|
55832
56036
|
};
|
|
55833
|
-
|
|
56037
|
+
VxeUI192.watermark = WatermarkController;
|
|
55834
56038
|
var Watermark = VxeWatermark;
|
|
55835
56039
|
var watermark_default2 = VxeWatermark;
|
|
55836
56040
|
|
|
55837
56041
|
// packages_temp/components.ts
|
|
55838
56042
|
__reExport(components_exports, core_star);
|
|
55839
56043
|
import * as core_star from "@vxe-ui/core";
|
|
55840
|
-
var { setI18n, setLanguage, setTheme, setConfig: setConfig2 } =
|
|
56044
|
+
var { setI18n, setLanguage, setTheme, setConfig: setConfig2 } = VxeUI193;
|
|
55841
56045
|
var components = [
|
|
55842
56046
|
alert_default2,
|
|
55843
56047
|
anchor_default2,
|
|
@@ -56155,7 +56359,7 @@ export {
|
|
|
56155
56359
|
VxeTransfer,
|
|
56156
56360
|
VxeTree,
|
|
56157
56361
|
VxeTreeSelect,
|
|
56158
|
-
|
|
56362
|
+
VxeUI193 as VxeUI,
|
|
56159
56363
|
VxeUpload,
|
|
56160
56364
|
VxeWatermark,
|
|
56161
56365
|
Watermark,
|