vxe-pc-ui 4.20.33 → 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 +722 -540
- package/dist/all.esm.min.js +3 -3
- package/dist/style.css +127 -2
- package/dist/style.mini.css +1 -1
- package/es/icon/style.css +1 -1
- package/es/icon/style.mini.css +1 -1
- 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 +910 -727
- package/lib/index.umd.min.js +3 -3
- 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/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/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.1793089621562.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/dist/{iconfont.1793089621562.woff → iconfont.1793330162657.woff} +0 -0
- /package/dist/{iconfont.1793089621562.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/es/icon/{iconfont.1793089621562.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/es/icon/{iconfont.1793089621562.woff → iconfont.1793330162657.woff} +0 -0
- /package/es/icon/{iconfont.1793089621562.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/es/{iconfont.1793089621562.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/es/{iconfont.1793089621562.woff → iconfont.1793330162657.woff} +0 -0
- /package/es/{iconfont.1793089621562.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/es/vxe-icon/{iconfont.1793089621562.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/es/vxe-icon/{iconfont.1793089621562.woff → iconfont.1793330162657.woff} +0 -0
- /package/es/vxe-icon/{iconfont.1793089621562.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1793089621562.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1793089621562.woff → iconfont.1793330162657.woff} +0 -0
- /package/lib/icon/style/{iconfont.1793089621562.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/lib/{iconfont.1793089621562.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/lib/{iconfont.1793089621562.woff → iconfont.1793330162657.woff} +0 -0
- /package/lib/{iconfont.1793089621562.woff2 → iconfont.1793330162657.woff2} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793089621562.ttf → iconfont.1793330162657.ttf} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793089621562.woff → iconfont.1793330162657.woff} +0 -0
- /package/lib/vxe-icon/style/{iconfont.1793089621562.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) {
|
|
@@ -36509,7 +36511,8 @@ var option_default = defineVxeComponent({
|
|
|
36509
36511
|
disabled: Boolean
|
|
36510
36512
|
},
|
|
36511
36513
|
emits: [],
|
|
36512
|
-
setup(props,
|
|
36514
|
+
setup(props, context) {
|
|
36515
|
+
const { slots } = context;
|
|
36513
36516
|
const elem = ref50();
|
|
36514
36517
|
const $xeSelect = inject27("$xeSelect", {});
|
|
36515
36518
|
const $xeOptgroup = inject27("$xeOptgroup", null);
|
|
@@ -36841,10 +36844,10 @@ var select_default = defineVxeComponent({
|
|
|
36841
36844
|
return Object.assign({}, props.defaultConfig);
|
|
36842
36845
|
});
|
|
36843
36846
|
const computePropsOpts = computed42(() => {
|
|
36844
|
-
return Object.assign({}, props.optionProps);
|
|
36847
|
+
return Object.assign({}, getConfig47().select.optionProps, props.optionProps);
|
|
36845
36848
|
});
|
|
36846
36849
|
const computeGroupPropsOpts = computed42(() => {
|
|
36847
|
-
return Object.assign({}, props.optionGroupProps);
|
|
36850
|
+
return Object.assign({}, getConfig47().select.optionGroupProps, props.optionGroupProps);
|
|
36848
36851
|
});
|
|
36849
36852
|
const computeLabelField = computed42(() => {
|
|
36850
36853
|
const propsOpts = computePropsOpts.value;
|
|
@@ -38593,24 +38596,29 @@ var select_default = defineVxeComponent({
|
|
|
38593
38596
|
]
|
|
38594
38597
|
);
|
|
38595
38598
|
};
|
|
38596
|
-
watch32(
|
|
38597
|
-
()
|
|
38598
|
-
|
|
38599
|
-
|
|
38600
|
-
|
|
38601
|
-
|
|
38602
|
-
|
|
38603
|
-
|
|
38604
|
-
|
|
38605
|
-
|
|
38606
|
-
|
|
38607
|
-
|
|
38608
|
-
|
|
38609
|
-
|
|
38610
|
-
|
|
38611
|
-
|
|
38612
|
-
|
|
38613
|
-
)
|
|
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
|
+
});
|
|
38614
38622
|
const reScrollFlag = ref51(0);
|
|
38615
38623
|
const reLayoutFlag = ref51(0);
|
|
38616
38624
|
watch32(computeIsVScrollbar, () => {
|
|
@@ -48066,57 +48074,190 @@ var textarea_default2 = VxeTextarea;
|
|
|
48066
48074
|
import { VxeUI as VxeUI176 } from "@vxe-ui/core";
|
|
48067
48075
|
|
|
48068
48076
|
// packages_temp/timeline/src/timeline.ts
|
|
48069
|
-
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";
|
|
48070
48078
|
import XEUtils105 from "xe-utils";
|
|
48071
48079
|
import { VxeUI as VxeUI175 } from "@vxe-ui/core";
|
|
48072
|
-
var { getConfig: getConfig68, createEvent: createEvent77 } = VxeUI175;
|
|
48073
|
-
|
|
48074
|
-
|
|
48075
|
-
|
|
48076
|
-
|
|
48077
|
-
|
|
48078
|
-
|
|
48079
|
-
|
|
48080
|
-
|
|
48081
|
-
|
|
48082
|
-
|
|
48083
|
-
|
|
48084
|
-
|
|
48085
|
-
|
|
48086
|
-
|
|
48087
|
-
|
|
48088
|
-
|
|
48089
|
-
|
|
48090
|
-
|
|
48091
|
-
|
|
48092
|
-
|
|
48093
|
-
|
|
48094
|
-
|
|
48095
|
-
|
|
48096
|
-
|
|
48097
|
-
|
|
48098
|
-
|
|
48099
|
-
|
|
48100
|
-
|
|
48101
|
-
|
|
48102
|
-
|
|
48103
|
-
|
|
48104
|
-
}
|
|
48105
|
-
|
|
48106
|
-
|
|
48107
|
-
|
|
48108
|
-
|
|
48109
|
-
|
|
48110
|
-
|
|
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);
|
|
48111
48136
|
});
|
|
48112
|
-
|
|
48113
|
-
|
|
48114
|
-
|
|
48115
|
-
|
|
48116
|
-
|
|
48117
|
-
|
|
48118
|
-
|
|
48119
|
-
});
|
|
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
|
+
);
|
|
48120
48261
|
|
|
48121
48262
|
// packages_temp/timeline/index.ts
|
|
48122
48263
|
var VxeTimeline = Object.assign({}, timeline_default, {
|
|
@@ -48130,55 +48271,96 @@ var Timeline = VxeTimeline;
|
|
|
48130
48271
|
var timeline_default2 = VxeTimeline;
|
|
48131
48272
|
|
|
48132
48273
|
// packages_temp/timeline-item/index.ts
|
|
48133
|
-
import { VxeUI as
|
|
48274
|
+
import { VxeUI as VxeUI177 } from "@vxe-ui/core";
|
|
48134
48275
|
|
|
48135
48276
|
// packages_temp/timeline/src/timeline-item.ts
|
|
48136
|
-
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
|
|
48137
48284
|
import XEUtils106 from "xe-utils";
|
|
48138
|
-
|
|
48139
|
-
|
|
48140
|
-
|
|
48141
|
-
|
|
48142
|
-
|
|
48143
|
-
|
|
48144
|
-
|
|
48145
|
-
const { emit } = context;
|
|
48146
|
-
const xID = XEUtils106.uniqueId();
|
|
48147
|
-
const refElem = ref75();
|
|
48148
|
-
const reactData = reactive81({});
|
|
48149
|
-
const refMaps = {
|
|
48150
|
-
refElem
|
|
48151
|
-
};
|
|
48152
|
-
const computeMaps = {};
|
|
48153
|
-
const $xeTimelineItem = {
|
|
48154
|
-
xID,
|
|
48155
|
-
props,
|
|
48156
|
-
context,
|
|
48157
|
-
reactData,
|
|
48158
|
-
getRefMaps: () => refMaps,
|
|
48159
|
-
getComputeMaps: () => computeMaps
|
|
48160
|
-
};
|
|
48161
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
48162
|
-
emit(type, createEvent78(evnt, { $timelineItem: $xeTimelineItem }, params));
|
|
48163
|
-
};
|
|
48164
|
-
const tagMethods = {
|
|
48165
|
-
dispatchEvent
|
|
48166
|
-
};
|
|
48167
|
-
const tagPrivateMethods = {};
|
|
48168
|
-
Object.assign($xeTimelineItem, tagMethods, tagPrivateMethods);
|
|
48169
|
-
const renderVN = () => {
|
|
48170
|
-
return h89("div", {
|
|
48171
|
-
ref: refElem,
|
|
48172
|
-
class: "vxe-timeline-item"
|
|
48173
|
-
});
|
|
48174
|
-
};
|
|
48175
|
-
$xeTimelineItem.renderVN = renderVN;
|
|
48176
|
-
return $xeTimelineItem;
|
|
48177
|
-
},
|
|
48178
|
-
render() {
|
|
48179
|
-
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
|
+
});
|
|
48180
48292
|
}
|
|
48181
|
-
|
|
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
|
+
);
|
|
48182
48364
|
|
|
48183
48365
|
// packages_temp/timeline-item/index.ts
|
|
48184
48366
|
var VxeTimelineItem = Object.assign({}, timeline_item_default, {
|
|
@@ -48187,18 +48369,18 @@ var VxeTimelineItem = Object.assign({}, timeline_item_default, {
|
|
|
48187
48369
|
}
|
|
48188
48370
|
});
|
|
48189
48371
|
dynamicApp.use(VxeTimelineItem);
|
|
48190
|
-
|
|
48372
|
+
VxeUI177.component(timeline_item_default);
|
|
48191
48373
|
var TimelineItem = VxeTimelineItem;
|
|
48192
48374
|
var timeline_item_default2 = VxeTimelineItem;
|
|
48193
48375
|
|
|
48194
48376
|
// packages_temp/tip/index.ts
|
|
48195
|
-
import { VxeUI as
|
|
48377
|
+
import { VxeUI as VxeUI179 } from "@vxe-ui/core";
|
|
48196
48378
|
|
|
48197
48379
|
// packages_temp/tip/src/tip.ts
|
|
48198
|
-
import { ref as ref76, h as h90, reactive as
|
|
48199
|
-
import
|
|
48200
|
-
import { VxeUI as
|
|
48201
|
-
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;
|
|
48202
48384
|
var tip_default = defineVxeComponent({
|
|
48203
48385
|
name: "VxeTip",
|
|
48204
48386
|
props: {
|
|
@@ -48224,11 +48406,11 @@ var tip_default = defineVxeComponent({
|
|
|
48224
48406
|
emits: [],
|
|
48225
48407
|
setup(props, context) {
|
|
48226
48408
|
const { slots, emit } = context;
|
|
48227
|
-
const xID =
|
|
48228
|
-
const { computeSize } =
|
|
48229
|
-
const { computePermissionInfo } =
|
|
48409
|
+
const xID = XEUtils108.uniqueId();
|
|
48410
|
+
const { computeSize } = useFns60.useSize(props);
|
|
48411
|
+
const { computePermissionInfo } = useFns60.usePermission(props);
|
|
48230
48412
|
const refElem = ref76();
|
|
48231
|
-
const reactData =
|
|
48413
|
+
const reactData = reactive81({});
|
|
48232
48414
|
const refMaps = {
|
|
48233
48415
|
refElem
|
|
48234
48416
|
};
|
|
@@ -48242,7 +48424,7 @@ var tip_default = defineVxeComponent({
|
|
|
48242
48424
|
getComputeMaps: () => computeMaps
|
|
48243
48425
|
};
|
|
48244
48426
|
const dispatchEvent = (type, params, evnt) => {
|
|
48245
|
-
emit(type,
|
|
48427
|
+
emit(type, createEvent78(evnt, { $tip: $xeTip }, params));
|
|
48246
48428
|
};
|
|
48247
48429
|
const tipMethods = {
|
|
48248
48430
|
dispatchEvent
|
|
@@ -48295,14 +48477,14 @@ var tip_default = defineVxeComponent({
|
|
|
48295
48477
|
{
|
|
48296
48478
|
class: "vxe-tip--title"
|
|
48297
48479
|
},
|
|
48298
|
-
titleSlot ? getSlotVNs(titleSlot({})) :
|
|
48480
|
+
titleSlot ? getSlotVNs(titleSlot({})) : XEUtils108.toValueString(title)
|
|
48299
48481
|
) : renderEmptyElement56($xeTip),
|
|
48300
48482
|
h90(
|
|
48301
48483
|
"div",
|
|
48302
48484
|
{
|
|
48303
48485
|
class: "vxe-tip--content"
|
|
48304
48486
|
},
|
|
48305
|
-
defaultSlot ? getSlotVNs(defaultSlot({})) :
|
|
48487
|
+
defaultSlot ? getSlotVNs(defaultSlot({})) : XEUtils108.toValueString(content)
|
|
48306
48488
|
)
|
|
48307
48489
|
]
|
|
48308
48490
|
)
|
|
@@ -48325,19 +48507,19 @@ var VxeTip = Object.assign({}, tip_default, {
|
|
|
48325
48507
|
}
|
|
48326
48508
|
});
|
|
48327
48509
|
dynamicApp.use(VxeTip);
|
|
48328
|
-
|
|
48510
|
+
VxeUI179.component(tip_default);
|
|
48329
48511
|
var Tips = VxeTip;
|
|
48330
48512
|
var Tip = VxeTip;
|
|
48331
48513
|
var tip_default2 = VxeTip;
|
|
48332
48514
|
|
|
48333
48515
|
// packages_temp/tour/index.ts
|
|
48334
|
-
import { VxeUI as
|
|
48516
|
+
import { VxeUI as VxeUI181 } from "@vxe-ui/core";
|
|
48335
48517
|
|
|
48336
48518
|
// packages_temp/tour/src/tour.ts
|
|
48337
|
-
import { ref as ref77, h as h91, reactive as
|
|
48338
|
-
import
|
|
48339
|
-
import { VxeUI as
|
|
48340
|
-
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;
|
|
48341
48523
|
var tour_default = defineVxeComponent({
|
|
48342
48524
|
name: "VxeTour",
|
|
48343
48525
|
props: {
|
|
@@ -48349,9 +48531,9 @@ var tour_default = defineVxeComponent({
|
|
|
48349
48531
|
emits: [],
|
|
48350
48532
|
setup(props, context) {
|
|
48351
48533
|
const { emit } = context;
|
|
48352
|
-
const xID =
|
|
48534
|
+
const xID = XEUtils109.uniqueId();
|
|
48353
48535
|
const refElem = ref77();
|
|
48354
|
-
const reactData =
|
|
48536
|
+
const reactData = reactive82({});
|
|
48355
48537
|
const refMaps = {
|
|
48356
48538
|
refElem
|
|
48357
48539
|
};
|
|
@@ -48365,7 +48547,7 @@ var tour_default = defineVxeComponent({
|
|
|
48365
48547
|
getComputeMaps: () => computeMaps
|
|
48366
48548
|
};
|
|
48367
48549
|
const dispatchEvent = (type, params, evnt) => {
|
|
48368
|
-
emit(type,
|
|
48550
|
+
emit(type, createEvent79(evnt, { $tour: $xeTour }, params));
|
|
48369
48551
|
};
|
|
48370
48552
|
const tagMethods = {
|
|
48371
48553
|
dispatchEvent
|
|
@@ -48393,22 +48575,22 @@ var VxeTour = Object.assign({}, tour_default, {
|
|
|
48393
48575
|
}
|
|
48394
48576
|
});
|
|
48395
48577
|
dynamicApp.use(VxeTour);
|
|
48396
|
-
|
|
48578
|
+
VxeUI181.component(tour_default);
|
|
48397
48579
|
var Tour = VxeTour;
|
|
48398
48580
|
var tour_default2 = VxeTour;
|
|
48399
48581
|
|
|
48400
48582
|
// packages_temp/transfer/index.ts
|
|
48401
|
-
import { VxeUI as
|
|
48583
|
+
import { VxeUI as VxeUI183 } from "@vxe-ui/core";
|
|
48402
48584
|
|
|
48403
48585
|
// packages_temp/transfer/src/transfer.ts
|
|
48404
|
-
import { ref as ref78, h as h92, reactive as
|
|
48405
|
-
import
|
|
48406
|
-
import { VxeUI as
|
|
48407
|
-
var { getConfig: getConfig71, createEvent:
|
|
48408
|
-
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() {
|
|
48409
48591
|
return {};
|
|
48410
48592
|
}
|
|
48411
|
-
function
|
|
48593
|
+
function createInternalData24() {
|
|
48412
48594
|
return {};
|
|
48413
48595
|
}
|
|
48414
48596
|
var transfer_default = defineVxeComponent({
|
|
@@ -48424,10 +48606,10 @@ var transfer_default = defineVxeComponent({
|
|
|
48424
48606
|
emits: [],
|
|
48425
48607
|
setup(props, context) {
|
|
48426
48608
|
const { emit, slots } = context;
|
|
48427
|
-
const xID =
|
|
48609
|
+
const xID = XEUtils110.uniqueId();
|
|
48428
48610
|
const refElem = ref78();
|
|
48429
|
-
const reactData =
|
|
48430
|
-
const internalData =
|
|
48611
|
+
const reactData = reactive83(createReactData25());
|
|
48612
|
+
const internalData = createInternalData24();
|
|
48431
48613
|
const refMaps = {
|
|
48432
48614
|
refElem
|
|
48433
48615
|
};
|
|
@@ -48442,7 +48624,7 @@ var transfer_default = defineVxeComponent({
|
|
|
48442
48624
|
getComputeMaps: () => computeMaps
|
|
48443
48625
|
};
|
|
48444
48626
|
const dispatchEvent = (type, params, evnt) => {
|
|
48445
|
-
emit(type,
|
|
48627
|
+
emit(type, createEvent80(evnt, { $transfer: $xeTransfer }, params));
|
|
48446
48628
|
};
|
|
48447
48629
|
const transferMethods = {
|
|
48448
48630
|
dispatchEvent
|
|
@@ -48493,9 +48675,9 @@ var transfer_default = defineVxeComponent({
|
|
|
48493
48675
|
]
|
|
48494
48676
|
);
|
|
48495
48677
|
};
|
|
48496
|
-
|
|
48497
|
-
|
|
48498
|
-
|
|
48678
|
+
onBeforeUnmount22(() => {
|
|
48679
|
+
XEUtils110.assign(reactData, createReactData25());
|
|
48680
|
+
XEUtils110.assign(internalData, createInternalData24());
|
|
48499
48681
|
});
|
|
48500
48682
|
$xeTransfer.renderVN = renderVN;
|
|
48501
48683
|
return $xeTransfer;
|
|
@@ -48512,16 +48694,16 @@ var VxeTransfer = Object.assign({}, transfer_default, {
|
|
|
48512
48694
|
}
|
|
48513
48695
|
});
|
|
48514
48696
|
dynamicApp.use(VxeTransfer);
|
|
48515
|
-
|
|
48697
|
+
VxeUI183.component(transfer_default);
|
|
48516
48698
|
var Transfer = VxeTransfer;
|
|
48517
48699
|
var transfer_default2 = VxeTransfer;
|
|
48518
48700
|
|
|
48519
48701
|
// packages_temp/tree/index.ts
|
|
48520
|
-
import { VxeUI as
|
|
48702
|
+
import { VxeUI as VxeUI185 } from "@vxe-ui/core";
|
|
48521
48703
|
|
|
48522
48704
|
// packages_temp/tree/src/tree.ts
|
|
48523
|
-
import { ref as ref79, h as h93, reactive as
|
|
48524
|
-
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";
|
|
48525
48707
|
|
|
48526
48708
|
// packages_temp/tree/src/util.ts
|
|
48527
48709
|
function countTreeExpand($xeTree, prevNode) {
|
|
@@ -48573,8 +48755,8 @@ function getItemCacheObj2(item) {
|
|
|
48573
48755
|
}
|
|
48574
48756
|
|
|
48575
48757
|
// packages_temp/tree/src/store.ts
|
|
48576
|
-
import { reactive as
|
|
48577
|
-
var crossTreeDragNodeInfo =
|
|
48758
|
+
import { reactive as reactive84 } from "vue";
|
|
48759
|
+
var crossTreeDragNodeInfo = reactive84({
|
|
48578
48760
|
node: null
|
|
48579
48761
|
});
|
|
48580
48762
|
function getCrossTreeDragNodeInfo() {
|
|
@@ -48582,14 +48764,14 @@ function getCrossTreeDragNodeInfo() {
|
|
|
48582
48764
|
}
|
|
48583
48765
|
|
|
48584
48766
|
// packages_temp/tree/src/tree.ts
|
|
48585
|
-
import
|
|
48767
|
+
import XEUtils111 from "xe-utils";
|
|
48586
48768
|
var { warnLog: warnLog18, errLog: errLog21 } = createComponentLog("tree");
|
|
48587
|
-
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;
|
|
48588
48770
|
var { getDefVal: getDefVal6 } = baseUtils6;
|
|
48589
48771
|
function getNodeUniqueId2() {
|
|
48590
|
-
return
|
|
48772
|
+
return XEUtils111.uniqueId("node_");
|
|
48591
48773
|
}
|
|
48592
|
-
function
|
|
48774
|
+
function createReactData26() {
|
|
48593
48775
|
return {
|
|
48594
48776
|
parentHeight: 0,
|
|
48595
48777
|
customHeight: 0,
|
|
@@ -48617,7 +48799,7 @@ function createReactData25() {
|
|
|
48617
48799
|
}
|
|
48618
48800
|
};
|
|
48619
48801
|
}
|
|
48620
|
-
function
|
|
48802
|
+
function createInternalData25() {
|
|
48621
48803
|
return {
|
|
48622
48804
|
// initialized: false,
|
|
48623
48805
|
// lastFilterValue: '',
|
|
@@ -48814,7 +48996,7 @@ var tree_default = defineVxeComponent({
|
|
|
48814
48996
|
],
|
|
48815
48997
|
setup(props, context) {
|
|
48816
48998
|
const { emit, slots } = context;
|
|
48817
|
-
const xID =
|
|
48999
|
+
const xID = XEUtils111.uniqueId();
|
|
48818
49000
|
const refElem = ref79();
|
|
48819
49001
|
const refHeaderWrapperElem = ref79();
|
|
48820
49002
|
const refFooterWrapperElem = ref79();
|
|
@@ -48825,76 +49007,76 @@ var tree_default = defineVxeComponent({
|
|
|
48825
49007
|
const refDragTipElem = ref79();
|
|
48826
49008
|
const refTooltip2 = ref79();
|
|
48827
49009
|
const crossTreeDragNodeInfo2 = getCrossTreeDragNodeInfo();
|
|
48828
|
-
const internalData =
|
|
48829
|
-
const reactData =
|
|
48830
|
-
const { computeSize } =
|
|
48831
|
-
const { computeIsVScrollbar } =
|
|
49010
|
+
const internalData = createInternalData25();
|
|
49011
|
+
const reactData = reactive85(createReactData26());
|
|
49012
|
+
const { computeSize } = useFns61.useSize(props);
|
|
49013
|
+
const { computeIsVScrollbar } = useFns61.useVScrollbar(props);
|
|
48832
49014
|
const refMaps = {
|
|
48833
49015
|
refElem
|
|
48834
49016
|
};
|
|
48835
|
-
const computeTitleField =
|
|
49017
|
+
const computeTitleField = computed61(() => {
|
|
48836
49018
|
return props.titleField || "title";
|
|
48837
49019
|
});
|
|
48838
|
-
const computeKeyField =
|
|
49020
|
+
const computeKeyField = computed61(() => {
|
|
48839
49021
|
return props.keyField || "id";
|
|
48840
49022
|
});
|
|
48841
|
-
const computeValueField =
|
|
49023
|
+
const computeValueField = computed61(() => {
|
|
48842
49024
|
const keyField = computeKeyField.value;
|
|
48843
49025
|
return props.valueField || keyField;
|
|
48844
49026
|
});
|
|
48845
|
-
const computeParentField =
|
|
49027
|
+
const computeParentField = computed61(() => {
|
|
48846
49028
|
return props.parentField || "parentId";
|
|
48847
49029
|
});
|
|
48848
|
-
const computeChildrenField =
|
|
49030
|
+
const computeChildrenField = computed61(() => {
|
|
48849
49031
|
return props.childrenField || "children";
|
|
48850
49032
|
});
|
|
48851
|
-
const computeMapChildrenField =
|
|
49033
|
+
const computeMapChildrenField = computed61(() => {
|
|
48852
49034
|
return props.mapChildrenField || "mapChildren";
|
|
48853
49035
|
});
|
|
48854
|
-
const computeHasChildField =
|
|
49036
|
+
const computeHasChildField = computed61(() => {
|
|
48855
49037
|
return props.hasChildField || "hasChild";
|
|
48856
49038
|
});
|
|
48857
|
-
const computeVirtualYOpts =
|
|
49039
|
+
const computeVirtualYOpts = computed61(() => {
|
|
48858
49040
|
return Object.assign({}, getConfig72().tree.virtualYConfig, props.virtualYConfig);
|
|
48859
49041
|
});
|
|
48860
|
-
const computeIsNodeCurrent =
|
|
49042
|
+
const computeIsNodeCurrent = computed61(() => {
|
|
48861
49043
|
const nodeOpts = computeNodeOpts.value;
|
|
48862
49044
|
const { isCurrent } = nodeOpts;
|
|
48863
|
-
if (
|
|
49045
|
+
if (XEUtils111.isBoolean(isCurrent)) {
|
|
48864
49046
|
return isCurrent;
|
|
48865
49047
|
}
|
|
48866
49048
|
return props.isCurrent;
|
|
48867
49049
|
});
|
|
48868
|
-
const computeIsNodeHover =
|
|
49050
|
+
const computeIsNodeHover = computed61(() => {
|
|
48869
49051
|
const nodeOpts = computeNodeOpts.value;
|
|
48870
49052
|
const { isHover } = nodeOpts;
|
|
48871
|
-
if (
|
|
49053
|
+
if (XEUtils111.isBoolean(isHover)) {
|
|
48872
49054
|
return isHover;
|
|
48873
49055
|
}
|
|
48874
49056
|
return props.isHover;
|
|
48875
49057
|
});
|
|
48876
|
-
const computeRadioOpts =
|
|
49058
|
+
const computeRadioOpts = computed61(() => {
|
|
48877
49059
|
return Object.assign({ showIcon: true }, getConfig72().tree.radioConfig, props.radioConfig);
|
|
48878
49060
|
});
|
|
48879
|
-
const computeCheckboxOpts =
|
|
49061
|
+
const computeCheckboxOpts = computed61(() => {
|
|
48880
49062
|
return Object.assign({ showIcon: true }, getConfig72().tree.checkboxConfig, props.checkboxConfig);
|
|
48881
49063
|
});
|
|
48882
|
-
const computeNodeOpts =
|
|
49064
|
+
const computeNodeOpts = computed61(() => {
|
|
48883
49065
|
return Object.assign({}, getConfig72().tree.nodeConfig, props.nodeConfig);
|
|
48884
49066
|
});
|
|
48885
|
-
const computeLoadingOpts =
|
|
49067
|
+
const computeLoadingOpts = computed61(() => {
|
|
48886
49068
|
return Object.assign({}, getConfig72().tree.loadingConfig, props.loadingConfig);
|
|
48887
49069
|
});
|
|
48888
|
-
const computeDragOpts =
|
|
49070
|
+
const computeDragOpts = computed61(() => {
|
|
48889
49071
|
return Object.assign({}, getConfig72().tree.dragConfig, props.dragConfig);
|
|
48890
49072
|
});
|
|
48891
|
-
const computeTooltipOpts =
|
|
49073
|
+
const computeTooltipOpts = computed61(() => {
|
|
48892
49074
|
return Object.assign({}, getConfig72().tree.tooltipConfig, props.tooltipConfig);
|
|
48893
49075
|
});
|
|
48894
|
-
const computeMenuOpts =
|
|
49076
|
+
const computeMenuOpts = computed61(() => {
|
|
48895
49077
|
return Object.assign({}, getConfig72().tree.menuConfig, props.menuConfig);
|
|
48896
49078
|
});
|
|
48897
|
-
const computeWrapperStyles =
|
|
49079
|
+
const computeWrapperStyles = computed61(() => {
|
|
48898
49080
|
const barWidth = computeScrollYWidth.value;
|
|
48899
49081
|
const barHeight = computeScrollXHeight.value;
|
|
48900
49082
|
const stys = {};
|
|
@@ -48904,7 +49086,7 @@ var tree_default = defineVxeComponent({
|
|
|
48904
49086
|
}
|
|
48905
49087
|
return stys;
|
|
48906
49088
|
});
|
|
48907
|
-
const computeTreeStyle =
|
|
49089
|
+
const computeTreeStyle = computed61(() => {
|
|
48908
49090
|
const { indent } = props;
|
|
48909
49091
|
const { customHeight, customMinHeight, customMaxHeight } = reactData;
|
|
48910
49092
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
@@ -48933,53 +49115,53 @@ var tree_default = defineVxeComponent({
|
|
|
48933
49115
|
}
|
|
48934
49116
|
return stys;
|
|
48935
49117
|
});
|
|
48936
|
-
const computeFilterOpts =
|
|
49118
|
+
const computeFilterOpts = computed61(() => {
|
|
48937
49119
|
return Object.assign({}, getConfig72().tree.filterConfig, props.filterConfig);
|
|
48938
49120
|
});
|
|
48939
|
-
const computeScrollbarOpts =
|
|
49121
|
+
const computeScrollbarOpts = computed61(() => {
|
|
48940
49122
|
return Object.assign({}, getConfig72().tree.scrollbarConfig, props.scrollbarConfig);
|
|
48941
49123
|
});
|
|
48942
|
-
const computeScrollbarXOpts =
|
|
49124
|
+
const computeScrollbarXOpts = computed61(() => {
|
|
48943
49125
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48944
49126
|
return Object.assign({}, getConfig72().scrollbar.xConfig, scrollbarOpts.xConfig, {
|
|
48945
49127
|
visible: false
|
|
48946
49128
|
});
|
|
48947
49129
|
});
|
|
48948
|
-
const computeScrollbarYOpts =
|
|
49130
|
+
const computeScrollbarYOpts = computed61(() => {
|
|
48949
49131
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48950
49132
|
return Object.assign({}, getConfig72().scrollbar.yConfig, scrollbarOpts.yConfig);
|
|
48951
49133
|
});
|
|
48952
|
-
const computeScrollXHeight =
|
|
49134
|
+
const computeScrollXHeight = computed61(() => {
|
|
48953
49135
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48954
49136
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
48955
49137
|
return getDefVal6(getDefVal6(scrollbarXOpts.height, scrollbarOpts.height), getConfig72().scrollbar.height);
|
|
48956
49138
|
});
|
|
48957
|
-
const computeScrollYWidth =
|
|
49139
|
+
const computeScrollYWidth = computed61(() => {
|
|
48958
49140
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48959
49141
|
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
48960
49142
|
return getDefVal6(getDefVal6(scrollbarYOpts.width, scrollbarOpts.width), getConfig72().scrollbar.width);
|
|
48961
49143
|
});
|
|
48962
|
-
const computeScrollXVisible =
|
|
49144
|
+
const computeScrollXVisible = computed61(() => {
|
|
48963
49145
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48964
49146
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
48965
49147
|
return getDefVal6(scrollbarXOpts.visible, scrollbarOpts.visible);
|
|
48966
49148
|
});
|
|
48967
|
-
const computeScrollYVisible =
|
|
49149
|
+
const computeScrollYVisible = computed61(() => {
|
|
48968
49150
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48969
49151
|
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
48970
49152
|
return getDefVal6(scrollbarYOpts.visible, scrollbarOpts.visible);
|
|
48971
49153
|
});
|
|
48972
|
-
const computeScrollXAutoHide =
|
|
49154
|
+
const computeScrollXAutoHide = computed61(() => {
|
|
48973
49155
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48974
49156
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
48975
49157
|
return getDefVal6(getDefVal6(scrollbarXOpts.autoHide, scrollbarOpts.autoHide), getConfig72().scrollbar.autoHide);
|
|
48976
49158
|
});
|
|
48977
|
-
const computeScrollYAutoHide =
|
|
49159
|
+
const computeScrollYAutoHide = computed61(() => {
|
|
48978
49160
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48979
49161
|
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
48980
49162
|
return getDefVal6(getDefVal6(scrollbarYOpts.autoHide, scrollbarOpts.autoHide), getConfig72().scrollbar.autoHide);
|
|
48981
49163
|
});
|
|
48982
|
-
const computeScrollbarWrapperClss =
|
|
49164
|
+
const computeScrollbarWrapperClss = computed61(() => {
|
|
48983
49165
|
const { yThumbHeight, xThumbWidth } = reactData;
|
|
48984
49166
|
const scrollbarOpts = computeScrollbarOpts.value;
|
|
48985
49167
|
const scrollbarXToTop = computeScrollbarXToTop.value;
|
|
@@ -49001,11 +49183,11 @@ var tree_default = defineVxeComponent({
|
|
|
49001
49183
|
}
|
|
49002
49184
|
);
|
|
49003
49185
|
});
|
|
49004
|
-
const computeScrollbarXToTop =
|
|
49186
|
+
const computeScrollbarXToTop = computed61(() => {
|
|
49005
49187
|
const scrollbarXOpts = computeScrollbarXOpts.value;
|
|
49006
49188
|
return scrollbarXOpts.position === "top";
|
|
49007
49189
|
});
|
|
49008
|
-
const computeScrollbarYToLeft =
|
|
49190
|
+
const computeScrollbarYToLeft = computed61(() => {
|
|
49009
49191
|
const scrollbarYOpts = computeScrollbarYOpts.value;
|
|
49010
49192
|
return scrollbarYOpts.position === "left";
|
|
49011
49193
|
});
|
|
@@ -49028,13 +49210,13 @@ var tree_default = defineVxeComponent({
|
|
|
49028
49210
|
getRefMaps: () => refMaps,
|
|
49029
49211
|
getComputeMaps: () => computeMaps
|
|
49030
49212
|
};
|
|
49031
|
-
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);
|
|
49032
49214
|
const getNodeId = (node) => {
|
|
49033
49215
|
if (!node) {
|
|
49034
49216
|
return "";
|
|
49035
49217
|
}
|
|
49036
49218
|
const valueField = computeValueField.value;
|
|
49037
|
-
const nodeKey =
|
|
49219
|
+
const nodeKey = XEUtils111.get(node, valueField);
|
|
49038
49220
|
return enModelValue(nodeKey);
|
|
49039
49221
|
};
|
|
49040
49222
|
const isExpandByNode = (node) => {
|
|
@@ -49075,7 +49257,7 @@ var tree_default = defineVxeComponent({
|
|
|
49075
49257
|
const handleSetCheckboxByNodeId = (nodeKeys, checked) => {
|
|
49076
49258
|
const { nodeMaps } = internalData;
|
|
49077
49259
|
if (nodeKeys) {
|
|
49078
|
-
if (!
|
|
49260
|
+
if (!XEUtils111.isArray(nodeKeys)) {
|
|
49079
49261
|
nodeKeys = [nodeKeys];
|
|
49080
49262
|
}
|
|
49081
49263
|
const nodeList = [];
|
|
@@ -49112,7 +49294,7 @@ var tree_default = defineVxeComponent({
|
|
|
49112
49294
|
if (checkStrictly) {
|
|
49113
49295
|
nodeList.forEach(handleSelect);
|
|
49114
49296
|
} else {
|
|
49115
|
-
|
|
49297
|
+
XEUtils111.eachTree(nodeList, handleSelect, { children: transform ? mapChildrenField : childrenField });
|
|
49116
49298
|
}
|
|
49117
49299
|
reactData.updateCheckboxFlag++;
|
|
49118
49300
|
updateCheckboxStatus();
|
|
@@ -49133,7 +49315,7 @@ var tree_default = defineVxeComponent({
|
|
|
49133
49315
|
}
|
|
49134
49316
|
};
|
|
49135
49317
|
const dispatchEvent = (type, params, evnt) => {
|
|
49136
|
-
emit(type,
|
|
49318
|
+
emit(type, createEvent81(evnt, { $tree: $xeTree }, params));
|
|
49137
49319
|
};
|
|
49138
49320
|
const getParentElem = () => {
|
|
49139
49321
|
const el = refElem.value;
|
|
@@ -49148,9 +49330,9 @@ var tree_default = defineVxeComponent({
|
|
|
49148
49330
|
num = parentHeight;
|
|
49149
49331
|
} else {
|
|
49150
49332
|
if (isScale(val)) {
|
|
49151
|
-
num = Math.floor((
|
|
49333
|
+
num = Math.floor((XEUtils111.toInteger(val) || 1) / 100 * parentHeight);
|
|
49152
49334
|
} else {
|
|
49153
|
-
num =
|
|
49335
|
+
num = XEUtils111.toNumber(val);
|
|
49154
49336
|
}
|
|
49155
49337
|
num = Math.max(40, num);
|
|
49156
49338
|
}
|
|
@@ -49173,7 +49355,7 @@ var tree_default = defineVxeComponent({
|
|
|
49173
49355
|
let nodeid = getNodeId(item);
|
|
49174
49356
|
if (!nodeid) {
|
|
49175
49357
|
nodeid = getNodeUniqueId2();
|
|
49176
|
-
|
|
49358
|
+
XEUtils111.set(item, valueField, nodeid);
|
|
49177
49359
|
}
|
|
49178
49360
|
return item;
|
|
49179
49361
|
})
|
|
@@ -49184,13 +49366,13 @@ var tree_default = defineVxeComponent({
|
|
|
49184
49366
|
const valueField = computeValueField.value;
|
|
49185
49367
|
const childrenField = computeChildrenField.value;
|
|
49186
49368
|
const keyMaps = {};
|
|
49187
|
-
|
|
49369
|
+
XEUtils111.eachTree(
|
|
49188
49370
|
treeFullData,
|
|
49189
49371
|
(item, index, items, path, parenItem, nodes) => {
|
|
49190
49372
|
let nodeid = getNodeId(item);
|
|
49191
49373
|
if (!nodeid) {
|
|
49192
49374
|
nodeid = getNodeUniqueId2();
|
|
49193
|
-
|
|
49375
|
+
XEUtils111.set(item, valueField, nodeid);
|
|
49194
49376
|
}
|
|
49195
49377
|
keyMaps[nodeid] = {
|
|
49196
49378
|
item,
|
|
@@ -49216,7 +49398,7 @@ var tree_default = defineVxeComponent({
|
|
|
49216
49398
|
const childrenField = computeChildrenField.value;
|
|
49217
49399
|
const mapChildrenField = computeMapChildrenField.value;
|
|
49218
49400
|
let vtIndex = 0;
|
|
49219
|
-
|
|
49401
|
+
XEUtils111.eachTree(
|
|
49220
49402
|
afterTreeList,
|
|
49221
49403
|
(item, index, items, path, parenItem, nodes) => {
|
|
49222
49404
|
const nodeid = getNodeId(item);
|
|
@@ -49273,7 +49455,7 @@ var tree_default = defineVxeComponent({
|
|
|
49273
49455
|
beforeFilterMethod(bafParams);
|
|
49274
49456
|
}
|
|
49275
49457
|
if (transform) {
|
|
49276
|
-
treeList =
|
|
49458
|
+
treeList = XEUtils111.searchTree(treeFullData, handleSearch, {
|
|
49277
49459
|
original: true,
|
|
49278
49460
|
isEvery: true,
|
|
49279
49461
|
children: childrenField,
|
|
@@ -49299,7 +49481,7 @@ var tree_default = defineVxeComponent({
|
|
|
49299
49481
|
});
|
|
49300
49482
|
} else {
|
|
49301
49483
|
if (transform) {
|
|
49302
|
-
treeList =
|
|
49484
|
+
treeList = XEUtils111.searchTree(treeFullData, () => true, {
|
|
49303
49485
|
original: true,
|
|
49304
49486
|
isEvery: true,
|
|
49305
49487
|
children: childrenField,
|
|
@@ -49339,7 +49521,7 @@ var tree_default = defineVxeComponent({
|
|
|
49339
49521
|
const expandMaps = {};
|
|
49340
49522
|
if (transform) {
|
|
49341
49523
|
const fullData = [];
|
|
49342
|
-
|
|
49524
|
+
XEUtils111.eachTree(
|
|
49343
49525
|
afterTreeList,
|
|
49344
49526
|
(item, index, items, path, parentNode) => {
|
|
49345
49527
|
const nodeid = getNodeId(item);
|
|
@@ -49375,14 +49557,14 @@ var tree_default = defineVxeComponent({
|
|
|
49375
49557
|
});
|
|
49376
49558
|
reactData.treeList = treeList;
|
|
49377
49559
|
};
|
|
49378
|
-
const triggerSearchEvent =
|
|
49560
|
+
const triggerSearchEvent = XEUtils111.debounce(() => handleData(true), 350, { trailing: true });
|
|
49379
49561
|
const loadData = (list) => {
|
|
49380
49562
|
const { expandAll, expandNodeKeys, transform, rootParentValue, rootValues } = props;
|
|
49381
49563
|
const { initialized, scrollYStore } = internalData;
|
|
49382
49564
|
const keyField = computeKeyField.value;
|
|
49383
49565
|
const parentField = computeParentField.value;
|
|
49384
49566
|
const childrenField = computeChildrenField.value;
|
|
49385
|
-
const fullData = transform ?
|
|
49567
|
+
const fullData = transform ? XEUtils111.toArrayTree(list, {
|
|
49386
49568
|
key: keyField,
|
|
49387
49569
|
parentKey: parentField,
|
|
49388
49570
|
mapChildren: childrenField,
|
|
@@ -49462,7 +49644,7 @@ var tree_default = defineVxeComponent({
|
|
|
49462
49644
|
if (scrollYLoad) {
|
|
49463
49645
|
const scrollBodyElem = refVirtualWrapper.value;
|
|
49464
49646
|
const visibleYSize = Math.max(8, scrollBodyElem ? Math.ceil(scrollBodyElem.clientHeight / rowHeight) : 0);
|
|
49465
|
-
const offsetYSize = Math.max(0, Math.min(2,
|
|
49647
|
+
const offsetYSize = Math.max(0, Math.min(2, XEUtils111.toNumber(virtualYOpts.oSize)));
|
|
49466
49648
|
scrollYStore.offsetSize = offsetYSize;
|
|
49467
49649
|
scrollYStore.visibleSize = visibleYSize;
|
|
49468
49650
|
scrollYStore.endIndex = Math.max(scrollYStore.startIndex, visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
@@ -49475,16 +49657,16 @@ var tree_default = defineVxeComponent({
|
|
|
49475
49657
|
const handleScrollTo = (scrollLeft, scrollTop) => {
|
|
49476
49658
|
const scrollBodyElem = refVirtualWrapper.value;
|
|
49477
49659
|
if (scrollLeft) {
|
|
49478
|
-
if (!
|
|
49660
|
+
if (!XEUtils111.isNumber(scrollLeft)) {
|
|
49479
49661
|
scrollTop = scrollLeft.top;
|
|
49480
49662
|
scrollLeft = scrollLeft.left;
|
|
49481
49663
|
}
|
|
49482
49664
|
}
|
|
49483
49665
|
if (scrollBodyElem) {
|
|
49484
|
-
if (
|
|
49666
|
+
if (XEUtils111.isNumber(scrollLeft)) {
|
|
49485
49667
|
scrollBodyElem.scrollLeft = scrollLeft;
|
|
49486
49668
|
}
|
|
49487
|
-
if (
|
|
49669
|
+
if (XEUtils111.isNumber(scrollTop)) {
|
|
49488
49670
|
scrollBodyElem.scrollTop = scrollTop;
|
|
49489
49671
|
}
|
|
49490
49672
|
}
|
|
@@ -49663,7 +49845,7 @@ var tree_default = defineVxeComponent({
|
|
|
49663
49845
|
if (!tipOverEl) {
|
|
49664
49846
|
return;
|
|
49665
49847
|
}
|
|
49666
|
-
const cellText =
|
|
49848
|
+
const cellText = XEUtils111.toString(tipOverEl.textContent).trim();
|
|
49667
49849
|
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
|
|
49668
49850
|
let isShow = false;
|
|
49669
49851
|
let customContent = null;
|
|
@@ -49672,7 +49854,7 @@ var tree_default = defineVxeComponent({
|
|
|
49672
49854
|
customContent = contentMethod({ node, $event: evnt, $tree: $xeTree });
|
|
49673
49855
|
}
|
|
49674
49856
|
if (showAll) {
|
|
49675
|
-
if (
|
|
49857
|
+
if (XEUtils111.eqNull(customContent)) {
|
|
49676
49858
|
isShow = true;
|
|
49677
49859
|
content = cellText;
|
|
49678
49860
|
} else if (customContent !== "" && customContent !== false) {
|
|
@@ -49680,7 +49862,7 @@ var tree_default = defineVxeComponent({
|
|
|
49680
49862
|
content = "" + customContent;
|
|
49681
49863
|
}
|
|
49682
49864
|
} else {
|
|
49683
|
-
if (
|
|
49865
|
+
if (XEUtils111.eqNull(customContent)) {
|
|
49684
49866
|
isShow = isOver;
|
|
49685
49867
|
content = cellText;
|
|
49686
49868
|
} else if (customContent !== "" && customContent !== false) {
|
|
@@ -49741,8 +49923,8 @@ var tree_default = defineVxeComponent({
|
|
|
49741
49923
|
} else if (reactData.currentNode) {
|
|
49742
49924
|
reactData.currentNode = null;
|
|
49743
49925
|
}
|
|
49744
|
-
if (
|
|
49745
|
-
|
|
49926
|
+
if (VxeUI184.contextMenu) {
|
|
49927
|
+
VxeUI184.contextMenu.openByEvent(evnt, {
|
|
49746
49928
|
options,
|
|
49747
49929
|
events: {
|
|
49748
49930
|
optionClick(eventParams) {
|
|
@@ -49789,7 +49971,7 @@ var tree_default = defineVxeComponent({
|
|
|
49789
49971
|
if (treeExpandLazyLoadedMaps[nodeid]) {
|
|
49790
49972
|
treeExpandLazyLoadedMaps[nodeid] = false;
|
|
49791
49973
|
}
|
|
49792
|
-
if (!
|
|
49974
|
+
if (!XEUtils111.isArray(childRecords)) {
|
|
49793
49975
|
childRecords = [];
|
|
49794
49976
|
}
|
|
49795
49977
|
if (childRecords) {
|
|
@@ -49903,7 +50085,7 @@ var tree_default = defineVxeComponent({
|
|
|
49903
50085
|
if (!checkStrictly) {
|
|
49904
50086
|
const childNodeMaps = {};
|
|
49905
50087
|
const childNodeList = [];
|
|
49906
|
-
|
|
50088
|
+
XEUtils111.eachTree(
|
|
49907
50089
|
afterTreeList,
|
|
49908
50090
|
(node) => {
|
|
49909
50091
|
const nodeid = getNodeId(node);
|
|
@@ -50000,7 +50182,7 @@ var tree_default = defineVxeComponent({
|
|
|
50000
50182
|
const checkboxOpts = computeCheckboxOpts.value;
|
|
50001
50183
|
const { checkStrictly, checkMode, checkMethod } = checkboxOpts;
|
|
50002
50184
|
const nodeid = getNodeId(node);
|
|
50003
|
-
const childList =
|
|
50185
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
50004
50186
|
const isExistChild = childList && childList.length > 0;
|
|
50005
50187
|
const nodeItem = nodeMaps[nodeid] || {};
|
|
50006
50188
|
const nLevel = nodeItem.level;
|
|
@@ -50016,8 +50198,8 @@ var tree_default = defineVxeComponent({
|
|
|
50016
50198
|
selectCheckboxMaps[nodeid] = node;
|
|
50017
50199
|
}
|
|
50018
50200
|
if (!checkStrictly) {
|
|
50019
|
-
|
|
50020
|
-
|
|
50201
|
+
XEUtils111.eachTree(
|
|
50202
|
+
XEUtils111.get(node, transform ? mapChildrenField : childrenField),
|
|
50021
50203
|
(childNode) => {
|
|
50022
50204
|
const childNodeid = getNodeId(childNode);
|
|
50023
50205
|
if (isChecked) {
|
|
@@ -50035,7 +50217,7 @@ var tree_default = defineVxeComponent({
|
|
|
50035
50217
|
}
|
|
50036
50218
|
reactData.updateCheckboxFlag++;
|
|
50037
50219
|
updateCheckboxStatus();
|
|
50038
|
-
const nodeids =
|
|
50220
|
+
const nodeids = XEUtils111.keys(selectCheckboxMaps);
|
|
50039
50221
|
const value = nodeids.map(deModelValue);
|
|
50040
50222
|
emitCheckboxMode(value);
|
|
50041
50223
|
dispatchEvent("checkbox-change", { node, value, checked: isChecked }, evnt);
|
|
@@ -50045,7 +50227,7 @@ var tree_default = defineVxeComponent({
|
|
|
50045
50227
|
const nodeOpts = computeNodeOpts.value;
|
|
50046
50228
|
const { currentMethod, trigger } = nodeOpts;
|
|
50047
50229
|
const childrenField = computeChildrenField.value;
|
|
50048
|
-
const childList =
|
|
50230
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
50049
50231
|
const hasChild = childList && childList.length;
|
|
50050
50232
|
let isDisabled = !!currentMethod;
|
|
50051
50233
|
if (trigger === "child") {
|
|
@@ -50075,7 +50257,7 @@ var tree_default = defineVxeComponent({
|
|
|
50075
50257
|
const childrenField = computeChildrenField.value;
|
|
50076
50258
|
const { checkMode, checkMethod } = radioOpts;
|
|
50077
50259
|
const nodeid = getNodeId(node);
|
|
50078
|
-
const childList =
|
|
50260
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
50079
50261
|
const isExistChild = childList && childList.length > 0;
|
|
50080
50262
|
const nodeItem = nodeMaps[nodeid] || {};
|
|
50081
50263
|
const nLevel = nodeItem.level;
|
|
@@ -50099,7 +50281,7 @@ var tree_default = defineVxeComponent({
|
|
|
50099
50281
|
newRecords.forEach((item) => {
|
|
50100
50282
|
const parentNodeId = item[parentField];
|
|
50101
50283
|
const nodeid = getNodeId(item);
|
|
50102
|
-
const matchObj = parentNodeId ?
|
|
50284
|
+
const matchObj = parentNodeId ? XEUtils111.findTree(treeFullData, (item2) => parentNodeId === item2[keyField], { children: mapChildrenField }) : null;
|
|
50103
50285
|
const itemRest = getItemCacheObj2(item);
|
|
50104
50286
|
if (matchObj) {
|
|
50105
50287
|
const { item: parentItem } = matchObj;
|
|
@@ -50107,10 +50289,10 @@ var tree_default = defineVxeComponent({
|
|
|
50107
50289
|
const parentLevel = parentRest ? parentRest.level : 0;
|
|
50108
50290
|
let pChilds = parentItem[childrenField];
|
|
50109
50291
|
let pMapChilds = parentItem[mapChildrenField];
|
|
50110
|
-
if (!
|
|
50292
|
+
if (!XEUtils111.isArray(pChilds)) {
|
|
50111
50293
|
pChilds = parentItem[childrenField] = [];
|
|
50112
50294
|
}
|
|
50113
|
-
if (!
|
|
50295
|
+
if (!XEUtils111.isArray(pMapChilds)) {
|
|
50114
50296
|
pMapChilds = parentItem[mapChildrenField] = [];
|
|
50115
50297
|
}
|
|
50116
50298
|
itemRest.parent = parentItem;
|
|
@@ -50138,11 +50320,11 @@ var tree_default = defineVxeComponent({
|
|
|
50138
50320
|
errLog21("vxe.error.reqSupportProp", ["insert() | insertAt() | insertNextAt()", "transform"]);
|
|
50139
50321
|
return Promise.resolve({ node: null, nodes: [] });
|
|
50140
50322
|
}
|
|
50141
|
-
if (!
|
|
50323
|
+
if (!XEUtils111.isArray(records)) {
|
|
50142
50324
|
records = [records];
|
|
50143
50325
|
}
|
|
50144
50326
|
let targetNode = targetNodeOrNodeid;
|
|
50145
|
-
if (
|
|
50327
|
+
if (XEUtils111.isString(targetNodeOrNodeid) || XEUtils111.isNumber(targetNodeOrNodeid)) {
|
|
50146
50328
|
const nodeRest = nodeMaps[targetNodeOrNodeid];
|
|
50147
50329
|
if (nodeRest) {
|
|
50148
50330
|
targetNode = nodeRest.item;
|
|
@@ -50151,15 +50333,15 @@ var tree_default = defineVxeComponent({
|
|
|
50151
50333
|
if (!records.length) {
|
|
50152
50334
|
return Promise.resolve({ node: null, nodes: [] });
|
|
50153
50335
|
}
|
|
50154
|
-
const newRecords = records.map((record) =>
|
|
50155
|
-
const treeRecords =
|
|
50156
|
-
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)) {
|
|
50157
50339
|
insertTreeNode(newRecords, false);
|
|
50158
50340
|
} else {
|
|
50159
50341
|
if (targetNode === -1) {
|
|
50160
50342
|
insertTreeNode(newRecords, true);
|
|
50161
50343
|
} else {
|
|
50162
|
-
const matchMapObj =
|
|
50344
|
+
const matchMapObj = XEUtils111.findTree(treeFullData, (item) => targetNode[keyField] === item[keyField], { children: mapChildrenField });
|
|
50163
50345
|
if (matchMapObj) {
|
|
50164
50346
|
const { parent: parentNode } = matchMapObj;
|
|
50165
50347
|
const parentMapChilds = parentNode ? parentNode[mapChildrenField] : treeFullData;
|
|
@@ -50173,7 +50355,7 @@ var tree_default = defineVxeComponent({
|
|
|
50173
50355
|
}
|
|
50174
50356
|
} else {
|
|
50175
50357
|
if (item[parentField] !== null) {
|
|
50176
|
-
if (!
|
|
50358
|
+
if (!XEUtils111.eqNull(item[parentField])) {
|
|
50177
50359
|
errLog21("vxe.error.errProp", [`${parentField}=${item[parentField]}`, "null"]);
|
|
50178
50360
|
}
|
|
50179
50361
|
item[parentField] = null;
|
|
@@ -50185,7 +50367,7 @@ var tree_default = defineVxeComponent({
|
|
|
50185
50367
|
}
|
|
50186
50368
|
parentMapChilds.splice(targetIndex, 0, item);
|
|
50187
50369
|
});
|
|
50188
|
-
|
|
50370
|
+
XEUtils111.eachTree(
|
|
50189
50371
|
treeRecords,
|
|
50190
50372
|
(item) => {
|
|
50191
50373
|
const nodeid = getNodeId(item);
|
|
@@ -50199,7 +50381,7 @@ var tree_default = defineVxeComponent({
|
|
|
50199
50381
|
{ children: childrenField }
|
|
50200
50382
|
);
|
|
50201
50383
|
if (parentNode) {
|
|
50202
|
-
const matchObj =
|
|
50384
|
+
const matchObj = XEUtils111.findTree(treeFullData, (item) => targetNode[keyField] === item[keyField], { children: childrenField });
|
|
50203
50385
|
if (matchObj) {
|
|
50204
50386
|
const parentChilds = matchObj.items;
|
|
50205
50387
|
let targetIndex = matchObj.index;
|
|
@@ -50226,7 +50408,7 @@ var tree_default = defineVxeComponent({
|
|
|
50226
50408
|
insertNodeMaps[nodeid] = newItem;
|
|
50227
50409
|
}
|
|
50228
50410
|
};
|
|
50229
|
-
|
|
50411
|
+
XEUtils111.eachTree(treeRecords, handleStatus, { children: mapChildrenField });
|
|
50230
50412
|
reactData.removeNodeFlag++;
|
|
50231
50413
|
reactData.insertNodeFlag++;
|
|
50232
50414
|
cacheNodeMap();
|
|
@@ -50252,11 +50434,11 @@ var tree_default = defineVxeComponent({
|
|
|
50252
50434
|
errLog21("vxe.error.reqSupportProp", ["insertChild() | insertChildAt() | insertChildNextAt()", "transform"]);
|
|
50253
50435
|
return Promise.resolve({ node: null, nodes: [] });
|
|
50254
50436
|
}
|
|
50255
|
-
if (!
|
|
50437
|
+
if (!XEUtils111.isArray(records)) {
|
|
50256
50438
|
records = [records];
|
|
50257
50439
|
}
|
|
50258
50440
|
let parentNode = parentNodeOrParentId;
|
|
50259
|
-
if (
|
|
50441
|
+
if (XEUtils111.isString(parentNodeOrParentId) || XEUtils111.isNumber(parentNodeOrParentId)) {
|
|
50260
50442
|
const nodeRest = nodeMaps[parentNodeOrParentId];
|
|
50261
50443
|
if (nodeRest) {
|
|
50262
50444
|
parentNode = nodeRest.item;
|
|
@@ -50359,7 +50541,7 @@ var tree_default = defineVxeComponent({
|
|
|
50359
50541
|
},
|
|
50360
50542
|
setCheckboxNode(nodeList, checked) {
|
|
50361
50543
|
if (nodeList) {
|
|
50362
|
-
if (!
|
|
50544
|
+
if (!XEUtils111.isArray(nodeList)) {
|
|
50363
50545
|
nodeList = [nodeList];
|
|
50364
50546
|
}
|
|
50365
50547
|
handleCheckedCheckboxNode(nodeList, checked);
|
|
@@ -50375,7 +50557,7 @@ var tree_default = defineVxeComponent({
|
|
|
50375
50557
|
getCheckboxNodeIds() {
|
|
50376
50558
|
const { selectCheckboxMaps } = internalData;
|
|
50377
50559
|
const nodeKeys = [];
|
|
50378
|
-
|
|
50560
|
+
XEUtils111.each(selectCheckboxMaps, (item, nodeId) => {
|
|
50379
50561
|
nodeKeys.push(deModelValue(nodeId));
|
|
50380
50562
|
});
|
|
50381
50563
|
return nodeKeys;
|
|
@@ -50386,7 +50568,7 @@ var tree_default = defineVxeComponent({
|
|
|
50386
50568
|
getCheckboxRecords() {
|
|
50387
50569
|
const { nodeMaps, selectCheckboxMaps } = internalData;
|
|
50388
50570
|
const list = [];
|
|
50389
|
-
|
|
50571
|
+
XEUtils111.each(selectCheckboxMaps, (item, nodeid) => {
|
|
50390
50572
|
const nodeItem = nodeMaps[nodeid];
|
|
50391
50573
|
if (nodeItem) {
|
|
50392
50574
|
list.push(nodeItem.item);
|
|
@@ -50413,7 +50595,7 @@ var tree_default = defineVxeComponent({
|
|
|
50413
50595
|
const checkKeys = [];
|
|
50414
50596
|
const checkNodes = [];
|
|
50415
50597
|
if (checked) {
|
|
50416
|
-
|
|
50598
|
+
XEUtils111.eachTree(
|
|
50417
50599
|
transform ? afterTreeList : afterVisibleList,
|
|
50418
50600
|
(node) => {
|
|
50419
50601
|
const nodeid = getNodeId(node);
|
|
@@ -50438,7 +50620,7 @@ var tree_default = defineVxeComponent({
|
|
|
50438
50620
|
clearAllExpandNode() {
|
|
50439
50621
|
const { scrollYLoad } = reactData;
|
|
50440
50622
|
const { nodeMaps, scrollYStore } = internalData;
|
|
50441
|
-
|
|
50623
|
+
XEUtils111.each(nodeMaps, (nodeItem) => {
|
|
50442
50624
|
nodeItem.treeLoaded = false;
|
|
50443
50625
|
});
|
|
50444
50626
|
internalData.treeExpandedMaps = {};
|
|
@@ -50458,7 +50640,7 @@ var tree_default = defineVxeComponent({
|
|
|
50458
50640
|
setExpandByNodeId(nodeKeys, expanded) {
|
|
50459
50641
|
const { treeExpandedMaps } = internalData;
|
|
50460
50642
|
if (nodeKeys) {
|
|
50461
|
-
if (!
|
|
50643
|
+
if (!XEUtils111.isArray(nodeKeys)) {
|
|
50462
50644
|
nodeKeys = [nodeKeys];
|
|
50463
50645
|
}
|
|
50464
50646
|
nodeKeys.forEach((nodeKey) => {
|
|
@@ -50474,7 +50656,7 @@ var tree_default = defineVxeComponent({
|
|
|
50474
50656
|
getExpandNodeIds() {
|
|
50475
50657
|
const { treeExpandedMaps } = internalData;
|
|
50476
50658
|
const nodeKeys = [];
|
|
50477
|
-
|
|
50659
|
+
XEUtils111.each(treeExpandedMaps, (item, nodeId) => {
|
|
50478
50660
|
nodeKeys.push(deModelValue(nodeId));
|
|
50479
50661
|
});
|
|
50480
50662
|
return nodeKeys;
|
|
@@ -50482,7 +50664,7 @@ var tree_default = defineVxeComponent({
|
|
|
50482
50664
|
getExpandNodes() {
|
|
50483
50665
|
const { nodeMaps, treeExpandedMaps } = internalData;
|
|
50484
50666
|
const list = [];
|
|
50485
|
-
|
|
50667
|
+
XEUtils111.each(treeExpandedMaps, (item, nodeid) => {
|
|
50486
50668
|
const nodeItem = nodeMaps[nodeid];
|
|
50487
50669
|
if (nodeItem) {
|
|
50488
50670
|
list.push(nodeItem.item);
|
|
@@ -50493,7 +50675,7 @@ var tree_default = defineVxeComponent({
|
|
|
50493
50675
|
setExpandNode(nodes, expanded) {
|
|
50494
50676
|
const { treeExpandedMaps } = internalData;
|
|
50495
50677
|
if (nodes) {
|
|
50496
|
-
if (!
|
|
50678
|
+
if (!XEUtils111.isArray(nodes)) {
|
|
50497
50679
|
nodes = [nodes];
|
|
50498
50680
|
}
|
|
50499
50681
|
nodes.forEach((node) => {
|
|
@@ -50509,7 +50691,7 @@ var tree_default = defineVxeComponent({
|
|
|
50509
50691
|
toggleExpandByNodeId(nodeKeys) {
|
|
50510
50692
|
const { treeExpandedMaps } = internalData;
|
|
50511
50693
|
if (nodeKeys) {
|
|
50512
|
-
if (!
|
|
50694
|
+
if (!XEUtils111.isArray(nodeKeys)) {
|
|
50513
50695
|
nodeKeys = [nodeKeys];
|
|
50514
50696
|
}
|
|
50515
50697
|
nodeKeys.forEach((nodeKey) => {
|
|
@@ -50525,7 +50707,7 @@ var tree_default = defineVxeComponent({
|
|
|
50525
50707
|
toggleExpandNode(nodes) {
|
|
50526
50708
|
const { treeExpandedMaps } = internalData;
|
|
50527
50709
|
if (nodes) {
|
|
50528
|
-
if (!
|
|
50710
|
+
if (!XEUtils111.isArray(nodes)) {
|
|
50529
50711
|
nodes = [nodes];
|
|
50530
50712
|
}
|
|
50531
50713
|
nodes.forEach((node) => {
|
|
@@ -50545,10 +50727,10 @@ var tree_default = defineVxeComponent({
|
|
|
50545
50727
|
const childrenField = computeChildrenField.value;
|
|
50546
50728
|
const mapChildrenField = computeMapChildrenField.value;
|
|
50547
50729
|
if (expanded) {
|
|
50548
|
-
|
|
50730
|
+
XEUtils111.eachTree(
|
|
50549
50731
|
internalData.afterTreeList,
|
|
50550
50732
|
(node) => {
|
|
50551
|
-
const childList =
|
|
50733
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
50552
50734
|
const hasChild = childList && childList.length;
|
|
50553
50735
|
if (hasChild) {
|
|
50554
50736
|
const nodeid = getNodeId(node);
|
|
@@ -50607,7 +50789,7 @@ var tree_default = defineVxeComponent({
|
|
|
50607
50789
|
const parentLevel = parentNodeItem ? parentNodeItem.level : 0;
|
|
50608
50790
|
const parentNodes = parentNodeItem ? parentNodeItem.nodes : [];
|
|
50609
50791
|
return createNode(childRecords).then((nodeList) => {
|
|
50610
|
-
|
|
50792
|
+
XEUtils111.eachTree(
|
|
50611
50793
|
nodeList,
|
|
50612
50794
|
(childNode, index, items, path, parent, nodes) => {
|
|
50613
50795
|
const itemNodeId = getNodeId(childNode);
|
|
@@ -50644,7 +50826,7 @@ var tree_default = defineVxeComponent({
|
|
|
50644
50826
|
getCheckboxIndeterminateNodes() {
|
|
50645
50827
|
const { nodeMaps, indeterminateNodeMaps } = internalData;
|
|
50646
50828
|
const list = [];
|
|
50647
|
-
|
|
50829
|
+
XEUtils111.each(indeterminateNodeMaps, (item, nodeid) => {
|
|
50648
50830
|
const nodeItem = nodeMaps[nodeid];
|
|
50649
50831
|
if (nodeItem) {
|
|
50650
50832
|
list.push(nodeItem.item);
|
|
@@ -50669,10 +50851,10 @@ var tree_default = defineVxeComponent({
|
|
|
50669
50851
|
const scrollBodyElem = refVirtualWrapper.value;
|
|
50670
50852
|
if (nodeid && scrollBodyElem) {
|
|
50671
50853
|
if (transform) {
|
|
50672
|
-
const matchObj =
|
|
50854
|
+
const matchObj = XEUtils111.findTree(afterTreeList, (item) => getNodeId(item) === nodeid, { children: transform ? mapChildrenField : childrenField });
|
|
50673
50855
|
if (matchObj) {
|
|
50674
50856
|
return $xeTree.setExpandNode(matchObj.nodes, true).then(() => {
|
|
50675
|
-
const itemIndex =
|
|
50857
|
+
const itemIndex = XEUtils111.findIndexOf(internalData.afterVisibleList, (item) => getNodeId(item) === nodeid);
|
|
50676
50858
|
if (itemIndex > -1) {
|
|
50677
50859
|
const targetTop = Math.max(0, (itemIndex - 1) * scrollYStore.rowHeight);
|
|
50678
50860
|
return handleScrollTo(scrollBodyElem.scrollLeft, targetTop);
|
|
@@ -50710,7 +50892,7 @@ var tree_default = defineVxeComponent({
|
|
|
50710
50892
|
getInsertRecords() {
|
|
50711
50893
|
const { insertNodeMaps } = internalData;
|
|
50712
50894
|
const insertRecords = [];
|
|
50713
|
-
|
|
50895
|
+
XEUtils111.each(insertNodeMaps, (item) => {
|
|
50714
50896
|
insertRecords.push(item);
|
|
50715
50897
|
});
|
|
50716
50898
|
return insertRecords;
|
|
@@ -50731,7 +50913,7 @@ var tree_default = defineVxeComponent({
|
|
|
50731
50913
|
let delList = [];
|
|
50732
50914
|
if (!nodes) {
|
|
50733
50915
|
nodes = treeFullData;
|
|
50734
|
-
} else if (!
|
|
50916
|
+
} else if (!XEUtils111.isArray(nodes)) {
|
|
50735
50917
|
nodes = [nodes];
|
|
50736
50918
|
}
|
|
50737
50919
|
if (!nodes.length) {
|
|
@@ -50749,12 +50931,12 @@ var tree_default = defineVxeComponent({
|
|
|
50749
50931
|
} else {
|
|
50750
50932
|
nodes.forEach((item) => {
|
|
50751
50933
|
const nodeid = getNodeId(item);
|
|
50752
|
-
const matchMapObj =
|
|
50934
|
+
const matchMapObj = XEUtils111.findTree(treeFullData, (item2) => nodeid === getNodeId(item2), { children: mapChildrenField });
|
|
50753
50935
|
if (matchMapObj) {
|
|
50754
50936
|
const rItems = matchMapObj.items.splice(matchMapObj.index, 1);
|
|
50755
50937
|
delList.push(rItems[0]);
|
|
50756
50938
|
}
|
|
50757
|
-
const matchObj =
|
|
50939
|
+
const matchObj = XEUtils111.findTree(treeFullData, (item2) => nodeid === getNodeId(item2), { children: childrenField });
|
|
50758
50940
|
if (matchObj) {
|
|
50759
50941
|
const rItems = matchObj.items.splice(matchObj.index, 1);
|
|
50760
50942
|
delList.push(rItems[0]);
|
|
@@ -50785,7 +50967,7 @@ var tree_default = defineVxeComponent({
|
|
|
50785
50967
|
getRemoveRecords() {
|
|
50786
50968
|
const { removeNodeMaps } = internalData;
|
|
50787
50969
|
const removeRecords = [];
|
|
50788
|
-
|
|
50970
|
+
XEUtils111.each(removeNodeMaps, (item) => {
|
|
50789
50971
|
removeRecords.push(item);
|
|
50790
50972
|
});
|
|
50791
50973
|
return removeRecords;
|
|
@@ -50811,7 +50993,7 @@ var tree_default = defineVxeComponent({
|
|
|
50811
50993
|
const el = refElem.value;
|
|
50812
50994
|
if (el) {
|
|
50813
50995
|
const clss = "node--drag-origin";
|
|
50814
|
-
|
|
50996
|
+
XEUtils111.arrayEach(el.querySelectorAll(`.${clss}`), (elem) => {
|
|
50815
50997
|
;
|
|
50816
50998
|
elem.draggable = false;
|
|
50817
50999
|
removeClass(elem, clss);
|
|
@@ -50823,7 +51005,7 @@ var tree_default = defineVxeComponent({
|
|
|
50823
51005
|
if (el) {
|
|
50824
51006
|
const clss = "node--drag-origin";
|
|
50825
51007
|
const nodeid = getNodeId(node);
|
|
50826
|
-
|
|
51008
|
+
XEUtils111.arrayEach(el.querySelectorAll(`.vxe-tree--node-wrapper[nodeid="${nodeid}"]`), (elem) => {
|
|
50827
51009
|
addClass(elem, clss);
|
|
50828
51010
|
});
|
|
50829
51011
|
}
|
|
@@ -50997,7 +51179,7 @@ var tree_default = defineVxeComponent({
|
|
|
50997
51179
|
if (oldRest && newRest) {
|
|
50998
51180
|
const { level: oldLevel } = oldRest;
|
|
50999
51181
|
const { level: newLevel } = newRest;
|
|
51000
|
-
|
|
51182
|
+
XEUtils111.eachTree(
|
|
51001
51183
|
[dragNode],
|
|
51002
51184
|
(item) => {
|
|
51003
51185
|
oldAllMaps[getNodeId(item)] = item;
|
|
@@ -51018,8 +51200,8 @@ var tree_default = defineVxeComponent({
|
|
|
51018
51200
|
if (oldAllMaps[newNodeid]) {
|
|
51019
51201
|
isSelfToChildStatus = true;
|
|
51020
51202
|
if (!(isCrossDrag && isSelfToChildDrag)) {
|
|
51021
|
-
if (
|
|
51022
|
-
|
|
51203
|
+
if (VxeUI184.modal) {
|
|
51204
|
+
VxeUI184.modal.message({
|
|
51023
51205
|
status: "error",
|
|
51024
51206
|
content: getI18n26("vxe.error.treeDragChild")
|
|
51025
51207
|
});
|
|
@@ -51042,8 +51224,8 @@ var tree_default = defineVxeComponent({
|
|
|
51042
51224
|
if (oldAllMaps[newNodeid]) {
|
|
51043
51225
|
isSelfToChildStatus = true;
|
|
51044
51226
|
if (!(isCrossDrag && isSelfToChildDrag)) {
|
|
51045
|
-
if (
|
|
51046
|
-
|
|
51227
|
+
if (VxeUI184.modal) {
|
|
51228
|
+
VxeUI184.modal.message({
|
|
51047
51229
|
status: "error",
|
|
51048
51230
|
content: getI18n26("vxe.error.treeDragChild")
|
|
51049
51231
|
});
|
|
@@ -51063,7 +51245,7 @@ var tree_default = defineVxeComponent({
|
|
|
51063
51245
|
}
|
|
51064
51246
|
if (transform) {
|
|
51065
51247
|
if (oldRest && newRest) {
|
|
51066
|
-
const fullList =
|
|
51248
|
+
const fullList = XEUtils111.toTreeArray(internalData.afterTreeList, {
|
|
51067
51249
|
updated: false,
|
|
51068
51250
|
key: keyField,
|
|
51069
51251
|
parentKey: parentField,
|
|
@@ -51075,12 +51257,12 @@ var tree_default = defineVxeComponent({
|
|
|
51075
51257
|
const ntfIndex = ptfIndex + dragOffsetIndex;
|
|
51076
51258
|
fullList.splice(ntfIndex, 0, dragNode);
|
|
51077
51259
|
if (isSelfToChildStatus && isCrossDrag && isSelfToChildDrag) {
|
|
51078
|
-
|
|
51260
|
+
XEUtils111.each(dragNode[childrenField], (childNode) => {
|
|
51079
51261
|
childNode[parentField] = dragNode[parentField];
|
|
51080
51262
|
});
|
|
51081
51263
|
}
|
|
51082
51264
|
dragNode[parentField] = isDragToChildFlag ? prevDragNode[keyField] : prevDragNode[parentField];
|
|
51083
|
-
internalData.treeFullData =
|
|
51265
|
+
internalData.treeFullData = XEUtils111.toArrayTree(fullList, {
|
|
51084
51266
|
key: keyField,
|
|
51085
51267
|
parentKey: parentField,
|
|
51086
51268
|
children: childrenField,
|
|
@@ -51298,7 +51480,7 @@ var tree_default = defineVxeComponent({
|
|
|
51298
51480
|
updateCheckboxStatus,
|
|
51299
51481
|
updateYSpace,
|
|
51300
51482
|
findNodeIndexOf(list, node) {
|
|
51301
|
-
return node ?
|
|
51483
|
+
return node ? XEUtils111.findIndexOf(list, (item) => $xeTree.eqNode(item, node)) : -1;
|
|
51302
51484
|
},
|
|
51303
51485
|
eqNode(node1, node2) {
|
|
51304
51486
|
if (node1 && node2) {
|
|
@@ -51344,7 +51526,7 @@ var tree_default = defineVxeComponent({
|
|
|
51344
51526
|
rsIndex = dragNodeRest.$index;
|
|
51345
51527
|
}
|
|
51346
51528
|
const dragRangeList = rsIndex > -1 && rsIndex < treeList.length - 1 ? treeList.slice(rsIndex + 1) : [];
|
|
51347
|
-
const dragList =
|
|
51529
|
+
const dragList = XEUtils111.toTreeArray([dragNode], {
|
|
51348
51530
|
updated: true,
|
|
51349
51531
|
children: mapChildrenField
|
|
51350
51532
|
});
|
|
@@ -51442,7 +51624,7 @@ var tree_default = defineVxeComponent({
|
|
|
51442
51624
|
return errRest;
|
|
51443
51625
|
}
|
|
51444
51626
|
let insertRest = Promise.resolve();
|
|
51445
|
-
const dragList =
|
|
51627
|
+
const dragList = XEUtils111.toTreeArray([dragNode], {
|
|
51446
51628
|
updated: true,
|
|
51447
51629
|
children: mapChildrenField
|
|
51448
51630
|
});
|
|
@@ -51667,14 +51849,14 @@ var tree_default = defineVxeComponent({
|
|
|
51667
51849
|
const childrenField = computeChildrenField.value;
|
|
51668
51850
|
const titleField = computeTitleField.value;
|
|
51669
51851
|
const hasChildField = computeHasChildField.value;
|
|
51670
|
-
const childList =
|
|
51852
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
51671
51853
|
const isExistChild = childList && childList.length > 0;
|
|
51672
51854
|
const iconSlot = slots.icon;
|
|
51673
51855
|
const titleSlot = slots.title;
|
|
51674
51856
|
const extraSlot = slots.extra;
|
|
51675
51857
|
const isExpand = updateExpandedFlag && treeExpandedMaps[nodeid];
|
|
51676
51858
|
const nodeItem = nodeMaps[nodeid] || {};
|
|
51677
|
-
const nodeTitle = getText(
|
|
51859
|
+
const nodeTitle = getText(XEUtils111.get(node, titleField));
|
|
51678
51860
|
const nLevel = nodeItem.level;
|
|
51679
51861
|
let isRadioChecked = false;
|
|
51680
51862
|
let isRadioDisabled = false;
|
|
@@ -51858,7 +52040,7 @@ var tree_default = defineVxeComponent({
|
|
|
51858
52040
|
} : (node) => {
|
|
51859
52041
|
const nodeid = getNodeId(node);
|
|
51860
52042
|
nodeVNs.push(renderNode(node, nodeid));
|
|
51861
|
-
const childList =
|
|
52043
|
+
const childList = XEUtils111.get(node, childrenField);
|
|
51862
52044
|
const hasChild = childList && childList.length;
|
|
51863
52045
|
if (hasChild && treeExpandedMaps[nodeid]) {
|
|
51864
52046
|
nodeVNs.push(...renderList(childList));
|
|
@@ -52139,62 +52321,62 @@ var tree_default = defineVxeComponent({
|
|
|
52139
52321
|
);
|
|
52140
52322
|
};
|
|
52141
52323
|
const dataFlag = ref79(0);
|
|
52142
|
-
|
|
52324
|
+
watch49(
|
|
52143
52325
|
() => props.data ? props.data.length : 0,
|
|
52144
52326
|
() => {
|
|
52145
52327
|
dataFlag.value++;
|
|
52146
52328
|
}
|
|
52147
52329
|
);
|
|
52148
|
-
|
|
52330
|
+
watch49(
|
|
52149
52331
|
() => props.data,
|
|
52150
52332
|
() => {
|
|
52151
52333
|
dataFlag.value++;
|
|
52152
52334
|
}
|
|
52153
52335
|
);
|
|
52154
|
-
|
|
52336
|
+
watch49(
|
|
52155
52337
|
() => props.rootParentValue,
|
|
52156
52338
|
() => {
|
|
52157
52339
|
dataFlag.value++;
|
|
52158
52340
|
}
|
|
52159
52341
|
);
|
|
52160
|
-
|
|
52342
|
+
watch49(
|
|
52161
52343
|
() => props.rootValues ? props.rootValues.length : 0,
|
|
52162
52344
|
() => {
|
|
52163
52345
|
dataFlag.value++;
|
|
52164
52346
|
}
|
|
52165
52347
|
);
|
|
52166
|
-
|
|
52348
|
+
watch49(
|
|
52167
52349
|
() => props.rootValues,
|
|
52168
52350
|
() => {
|
|
52169
52351
|
dataFlag.value++;
|
|
52170
52352
|
}
|
|
52171
52353
|
);
|
|
52172
|
-
|
|
52354
|
+
watch49(dataFlag, () => {
|
|
52173
52355
|
loadData(props.data || []);
|
|
52174
52356
|
});
|
|
52175
|
-
|
|
52357
|
+
watch49(
|
|
52176
52358
|
() => props.checkNodeKey,
|
|
52177
52359
|
(nodeKey) => {
|
|
52178
52360
|
reactData.selectRadioKey = enModelValue(nodeKey);
|
|
52179
52361
|
}
|
|
52180
52362
|
);
|
|
52181
52363
|
const checkboxFlag = ref79(0);
|
|
52182
|
-
|
|
52364
|
+
watch49(
|
|
52183
52365
|
() => props.checkNodeKeys ? props.checkNodeKeys.length : 0,
|
|
52184
52366
|
() => {
|
|
52185
52367
|
checkboxFlag.value++;
|
|
52186
52368
|
}
|
|
52187
52369
|
);
|
|
52188
|
-
|
|
52370
|
+
watch49(
|
|
52189
52371
|
() => props.checkNodeKeys,
|
|
52190
52372
|
() => {
|
|
52191
52373
|
checkboxFlag.value++;
|
|
52192
52374
|
}
|
|
52193
52375
|
);
|
|
52194
|
-
|
|
52376
|
+
watch49(checkboxFlag, () => {
|
|
52195
52377
|
updateCheckboxChecked(props.checkNodeKeys || []);
|
|
52196
52378
|
});
|
|
52197
|
-
|
|
52379
|
+
watch49(
|
|
52198
52380
|
() => props.filterValue,
|
|
52199
52381
|
() => {
|
|
52200
52382
|
triggerSearchEvent(new Event("filter"));
|
|
@@ -52202,25 +52384,25 @@ var tree_default = defineVxeComponent({
|
|
|
52202
52384
|
);
|
|
52203
52385
|
const reScrollFlag = ref79(0);
|
|
52204
52386
|
const reLayoutFlag = ref79(0);
|
|
52205
|
-
|
|
52387
|
+
watch49(
|
|
52206
52388
|
() => props.height,
|
|
52207
52389
|
() => {
|
|
52208
52390
|
reLayoutFlag.value++;
|
|
52209
52391
|
}
|
|
52210
52392
|
);
|
|
52211
|
-
|
|
52393
|
+
watch49(
|
|
52212
52394
|
() => props.minHeight,
|
|
52213
52395
|
() => {
|
|
52214
52396
|
reLayoutFlag.value++;
|
|
52215
52397
|
}
|
|
52216
52398
|
);
|
|
52217
|
-
|
|
52399
|
+
watch49(
|
|
52218
52400
|
() => props.maxHeight,
|
|
52219
52401
|
() => {
|
|
52220
52402
|
reLayoutFlag.value++;
|
|
52221
52403
|
}
|
|
52222
52404
|
);
|
|
52223
|
-
|
|
52405
|
+
watch49(computeIsVScrollbar, () => {
|
|
52224
52406
|
nextTick34(() => {
|
|
52225
52407
|
bindScrollbarResize();
|
|
52226
52408
|
nextTick34(() => {
|
|
@@ -52228,33 +52410,33 @@ var tree_default = defineVxeComponent({
|
|
|
52228
52410
|
});
|
|
52229
52411
|
});
|
|
52230
52412
|
});
|
|
52231
|
-
|
|
52413
|
+
watch49(computeScrollYWidth, () => {
|
|
52232
52414
|
reLayoutFlag.value++;
|
|
52233
52415
|
});
|
|
52234
|
-
|
|
52416
|
+
watch49(computeScrollXHeight, () => {
|
|
52235
52417
|
reLayoutFlag.value++;
|
|
52236
52418
|
});
|
|
52237
|
-
|
|
52419
|
+
watch49(computeScrollXVisible, () => {
|
|
52238
52420
|
nextTick34(() => {
|
|
52239
52421
|
reLayoutFlag.value++;
|
|
52240
52422
|
});
|
|
52241
52423
|
});
|
|
52242
|
-
|
|
52424
|
+
watch49(computeScrollYVisible, () => {
|
|
52243
52425
|
nextTick34(() => {
|
|
52244
52426
|
reLayoutFlag.value++;
|
|
52245
52427
|
});
|
|
52246
52428
|
});
|
|
52247
|
-
|
|
52429
|
+
watch49(reLayoutFlag, () => {
|
|
52248
52430
|
recalculate().then(() => {
|
|
52249
52431
|
recalculate();
|
|
52250
52432
|
});
|
|
52251
52433
|
});
|
|
52252
|
-
|
|
52434
|
+
watch49(reScrollFlag, () => {
|
|
52253
52435
|
updateScrollbar().then(() => {
|
|
52254
52436
|
updateScrollbar();
|
|
52255
52437
|
});
|
|
52256
52438
|
});
|
|
52257
|
-
|
|
52439
|
+
onMounted53(() => {
|
|
52258
52440
|
const { transform, drag, menuConfig, showOverflow, lazy, loadMethod, autoResize } = props;
|
|
52259
52441
|
const dragOpts = computeDragOpts.value;
|
|
52260
52442
|
if (!showOverflow) {
|
|
@@ -52269,7 +52451,7 @@ var tree_default = defineVxeComponent({
|
|
|
52269
52451
|
if (lazy && !loadMethod) {
|
|
52270
52452
|
warnLog18("vxe.error.reqSupportProp", ["lazy", "load-method"]);
|
|
52271
52453
|
}
|
|
52272
|
-
const VxeUIContextMenu =
|
|
52454
|
+
const VxeUIContextMenu = VxeUI184.getComponent("VxeContextMenu");
|
|
52273
52455
|
if (menuConfig && !VxeUIContextMenu) {
|
|
52274
52456
|
errLog21("vxe.error.reqComp", ["vxe-context-menu"]);
|
|
52275
52457
|
}
|
|
@@ -52295,7 +52477,7 @@ var tree_default = defineVxeComponent({
|
|
|
52295
52477
|
reLayoutFlag.value++;
|
|
52296
52478
|
});
|
|
52297
52479
|
});
|
|
52298
|
-
|
|
52480
|
+
onBeforeUnmount23(() => {
|
|
52299
52481
|
const { scrollObserver, resizeObserver } = internalData;
|
|
52300
52482
|
if (resizeObserver) {
|
|
52301
52483
|
resizeObserver.disconnect();
|
|
@@ -52304,13 +52486,13 @@ var tree_default = defineVxeComponent({
|
|
|
52304
52486
|
scrollObserver.disconnect();
|
|
52305
52487
|
}
|
|
52306
52488
|
globalEvents25.off($xeTree, "resize");
|
|
52307
|
-
|
|
52308
|
-
|
|
52489
|
+
XEUtils111.assign(reactData, createReactData26());
|
|
52490
|
+
XEUtils111.assign(internalData, createInternalData25());
|
|
52309
52491
|
});
|
|
52310
52492
|
reactData.selectRadioKey = enModelValue(props.checkNodeKey);
|
|
52311
52493
|
loadData(props.data || []);
|
|
52312
52494
|
$xeTree.renderVN = renderVN;
|
|
52313
|
-
|
|
52495
|
+
provide32("$xeTree", $xeTree);
|
|
52314
52496
|
return $xeTree;
|
|
52315
52497
|
},
|
|
52316
52498
|
render() {
|
|
@@ -52325,23 +52507,23 @@ var VxeTree = Object.assign({}, tree_default, {
|
|
|
52325
52507
|
}
|
|
52326
52508
|
});
|
|
52327
52509
|
dynamicApp.use(VxeTree);
|
|
52328
|
-
|
|
52510
|
+
VxeUI185.component(tree_default);
|
|
52329
52511
|
var Tree = VxeTree;
|
|
52330
52512
|
var tree_default2 = VxeTree;
|
|
52331
52513
|
|
|
52332
52514
|
// packages_temp/tree-select/index.ts
|
|
52333
|
-
import { VxeUI as
|
|
52515
|
+
import { VxeUI as VxeUI187 } from "@vxe-ui/core";
|
|
52334
52516
|
|
|
52335
52517
|
// packages_temp/tree-select/src/tree-select.ts
|
|
52336
|
-
import { ref as ref80, computed as
|
|
52337
|
-
import { VxeUI as
|
|
52338
|
-
import
|
|
52339
|
-
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;
|
|
52340
52522
|
var { warnLog: warnLog19, errLog: errLog22 } = createComponentLog("tree-select");
|
|
52341
52523
|
function getOptUniqueId2() {
|
|
52342
|
-
return
|
|
52524
|
+
return XEUtils112.uniqueId("node_");
|
|
52343
52525
|
}
|
|
52344
|
-
function
|
|
52526
|
+
function createReactData27() {
|
|
52345
52527
|
return {
|
|
52346
52528
|
initialized: false,
|
|
52347
52529
|
searchValue: "",
|
|
@@ -52357,7 +52539,7 @@ function createReactData26() {
|
|
|
52357
52539
|
lazyOptFlag: 1
|
|
52358
52540
|
};
|
|
52359
52541
|
}
|
|
52360
|
-
function
|
|
52542
|
+
function createInternalData26() {
|
|
52361
52543
|
return {
|
|
52362
52544
|
// hpTimeout: undefined,
|
|
52363
52545
|
fullOptionList: [],
|
|
@@ -52375,7 +52557,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52375
52557
|
},
|
|
52376
52558
|
placeholder: {
|
|
52377
52559
|
type: String,
|
|
52378
|
-
default: () =>
|
|
52560
|
+
default: () => XEUtils112.eqNull(getConfig73().treeSelect.placeholder) ? getI18n27("vxe.base.pleaseSelect") : getConfig73().treeSelect.placeholder
|
|
52379
52561
|
},
|
|
52380
52562
|
readonly: {
|
|
52381
52563
|
type: Boolean,
|
|
@@ -52482,25 +52664,25 @@ var tree_select_default = defineVxeComponent({
|
|
|
52482
52664
|
emits: ["update:modelValue", "change", "all-change", "clear", "blur", "focus", "click", "node-click", "visible-change"],
|
|
52483
52665
|
setup(props, context) {
|
|
52484
52666
|
const { emit, slots } = context;
|
|
52485
|
-
const $xeModal =
|
|
52486
|
-
const $xeDrawer =
|
|
52487
|
-
const $xeTable =
|
|
52488
|
-
const $xeForm =
|
|
52489
|
-
const formItemInfo =
|
|
52490
|
-
const xID =
|
|
52491
|
-
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);
|
|
52492
52674
|
const refElem = ref80();
|
|
52493
52675
|
const refInput = ref80();
|
|
52494
52676
|
const refInpSearch = ref80();
|
|
52495
52677
|
const refTreeWrapper = ref80();
|
|
52496
52678
|
const refOptionPanel = ref80();
|
|
52497
52679
|
const refTree = ref80();
|
|
52498
|
-
const reactData =
|
|
52499
|
-
const internalData =
|
|
52680
|
+
const reactData = reactive86(createReactData27());
|
|
52681
|
+
const internalData = createInternalData26();
|
|
52500
52682
|
const refMaps = {
|
|
52501
52683
|
refElem
|
|
52502
52684
|
};
|
|
52503
|
-
const computeFormReadonly =
|
|
52685
|
+
const computeFormReadonly = computed62(() => {
|
|
52504
52686
|
const { readonly } = props;
|
|
52505
52687
|
if (readonly === null) {
|
|
52506
52688
|
if ($xeForm) {
|
|
@@ -52510,7 +52692,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52510
52692
|
}
|
|
52511
52693
|
return readonly;
|
|
52512
52694
|
});
|
|
52513
|
-
const computeIsDisabled =
|
|
52695
|
+
const computeIsDisabled = computed62(() => {
|
|
52514
52696
|
const { disabled } = props;
|
|
52515
52697
|
if (disabled === null) {
|
|
52516
52698
|
if ($xeForm) {
|
|
@@ -52520,15 +52702,15 @@ var tree_select_default = defineVxeComponent({
|
|
|
52520
52702
|
}
|
|
52521
52703
|
return disabled;
|
|
52522
52704
|
});
|
|
52523
|
-
const computeBtnTransfer =
|
|
52705
|
+
const computeBtnTransfer = computed62(() => {
|
|
52524
52706
|
const popupOpts = computePopupOpts.value;
|
|
52525
52707
|
const { transfer } = popupOpts;
|
|
52526
|
-
if (
|
|
52708
|
+
if (XEUtils112.isBoolean(transfer)) {
|
|
52527
52709
|
return transfer;
|
|
52528
52710
|
}
|
|
52529
52711
|
if (props.transfer === null) {
|
|
52530
52712
|
const globalTransfer = getConfig73().treeSelect.transfer;
|
|
52531
|
-
if (
|
|
52713
|
+
if (XEUtils112.isBoolean(globalTransfer)) {
|
|
52532
52714
|
return globalTransfer;
|
|
52533
52715
|
}
|
|
52534
52716
|
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
@@ -52537,25 +52719,25 @@ var tree_select_default = defineVxeComponent({
|
|
|
52537
52719
|
}
|
|
52538
52720
|
return props.transfer;
|
|
52539
52721
|
});
|
|
52540
|
-
const computePopupOpts =
|
|
52722
|
+
const computePopupOpts = computed62(() => {
|
|
52541
52723
|
return Object.assign({}, getConfig73().treeSelect.popupConfig, props.popupConfig);
|
|
52542
52724
|
});
|
|
52543
|
-
const computeTreeOpts =
|
|
52725
|
+
const computeTreeOpts = computed62(() => {
|
|
52544
52726
|
return Object.assign({}, getConfig73().treeSelect.treeConfig, props.treeConfig, { data: void 0 });
|
|
52545
52727
|
});
|
|
52546
|
-
const computeMenuOpts =
|
|
52728
|
+
const computeMenuOpts = computed62(() => {
|
|
52547
52729
|
return Object.assign({}, getConfig73().treeSelect.menuConfig, props.menuConfig);
|
|
52548
52730
|
});
|
|
52549
|
-
const computeTreeNodeOpts =
|
|
52731
|
+
const computeTreeNodeOpts = computed62(() => {
|
|
52550
52732
|
const treeOpts = computeTreeOpts.value;
|
|
52551
52733
|
return Object.assign({ isHover: true }, treeOpts.nodeConfig);
|
|
52552
52734
|
});
|
|
52553
|
-
const computeTreeCheckboxOpts =
|
|
52735
|
+
const computeTreeCheckboxOpts = computed62(() => {
|
|
52554
52736
|
const { showCheckbox, checkboxConfig } = props;
|
|
52555
52737
|
const treeOpts = computeTreeOpts.value;
|
|
52556
52738
|
return Object.assign(
|
|
52557
52739
|
{
|
|
52558
|
-
showIcon:
|
|
52740
|
+
showIcon: XEUtils112.isBoolean(showCheckbox) ? showCheckbox : !!treeOpts.showCheckbox
|
|
52559
52741
|
},
|
|
52560
52742
|
treeOpts.checkboxConfig,
|
|
52561
52743
|
checkboxConfig,
|
|
@@ -52564,12 +52746,12 @@ var tree_select_default = defineVxeComponent({
|
|
|
52564
52746
|
}
|
|
52565
52747
|
);
|
|
52566
52748
|
});
|
|
52567
|
-
const computeTreeRadioOpts =
|
|
52749
|
+
const computeTreeRadioOpts = computed62(() => {
|
|
52568
52750
|
const { showRadio, radioConfig } = props;
|
|
52569
52751
|
const treeOpts = computeTreeOpts.value;
|
|
52570
52752
|
return Object.assign(
|
|
52571
52753
|
{
|
|
52572
|
-
showIcon:
|
|
52754
|
+
showIcon: XEUtils112.isBoolean(showRadio) ? showRadio : !!treeOpts.showRadio
|
|
52573
52755
|
},
|
|
52574
52756
|
treeOpts.radioConfig,
|
|
52575
52757
|
radioConfig,
|
|
@@ -52578,49 +52760,49 @@ var tree_select_default = defineVxeComponent({
|
|
|
52578
52760
|
}
|
|
52579
52761
|
);
|
|
52580
52762
|
});
|
|
52581
|
-
const computePropsOpts =
|
|
52763
|
+
const computePropsOpts = computed62(() => {
|
|
52582
52764
|
return Object.assign({}, getConfig73().treeSelect.optionProps, props.optionProps);
|
|
52583
52765
|
});
|
|
52584
|
-
const computeNodeKeyField =
|
|
52766
|
+
const computeNodeKeyField = computed62(() => {
|
|
52585
52767
|
const treeOpts = computeTreeOpts.value;
|
|
52586
52768
|
return treeOpts.keyField || "id";
|
|
52587
52769
|
});
|
|
52588
|
-
const computeLabelField =
|
|
52770
|
+
const computeLabelField = computed62(() => {
|
|
52589
52771
|
const propsOpts = computePropsOpts.value;
|
|
52590
52772
|
return propsOpts.label || "label";
|
|
52591
52773
|
});
|
|
52592
|
-
const computeValueField =
|
|
52774
|
+
const computeValueField = computed62(() => {
|
|
52593
52775
|
const propsOpts = computePropsOpts.value;
|
|
52594
52776
|
return propsOpts.value || "value";
|
|
52595
52777
|
});
|
|
52596
|
-
const computeChildrenField =
|
|
52778
|
+
const computeChildrenField = computed62(() => {
|
|
52597
52779
|
const propsOpts = computePropsOpts.value;
|
|
52598
52780
|
return propsOpts.children || "children";
|
|
52599
52781
|
});
|
|
52600
|
-
const computeNodeParentField =
|
|
52782
|
+
const computeNodeParentField = computed62(() => {
|
|
52601
52783
|
const propsOpts = computePropsOpts.value;
|
|
52602
52784
|
const treeOpts = computeTreeOpts.value;
|
|
52603
52785
|
return propsOpts.parent || treeOpts.parentField || "parentId";
|
|
52604
52786
|
});
|
|
52605
|
-
const computeHasChildField =
|
|
52787
|
+
const computeHasChildField = computed62(() => {
|
|
52606
52788
|
const propsOpts = computePropsOpts.value;
|
|
52607
52789
|
return propsOpts.hasChild || "hasChild";
|
|
52608
52790
|
});
|
|
52609
|
-
const computeVirtualYOpts =
|
|
52791
|
+
const computeVirtualYOpts = computed62(() => {
|
|
52610
52792
|
return Object.assign({}, getConfig73().treeSelect.virtualYConfig, props.virtualYConfig);
|
|
52611
52793
|
});
|
|
52612
|
-
const computeRemoteOpts =
|
|
52794
|
+
const computeRemoteOpts = computed62(() => {
|
|
52613
52795
|
return Object.assign({}, getConfig73().treeSelect.remoteConfig, props.remoteConfig);
|
|
52614
52796
|
});
|
|
52615
|
-
const computeFilterOpts =
|
|
52797
|
+
const computeFilterOpts = computed62(() => {
|
|
52616
52798
|
const treeOpts = computeTreeOpts.value;
|
|
52617
52799
|
return Object.assign({}, treeOpts.filterConfig, props.filterConfig);
|
|
52618
52800
|
});
|
|
52619
|
-
const computeSelectVals =
|
|
52801
|
+
const computeSelectVals = computed62(() => {
|
|
52620
52802
|
const { modelValue } = props;
|
|
52621
|
-
return
|
|
52803
|
+
return XEUtils112.eqNull(modelValue) ? [] : XEUtils112.isArray(modelValue) ? modelValue : [modelValue];
|
|
52622
52804
|
});
|
|
52623
|
-
const computeSelectLabel =
|
|
52805
|
+
const computeSelectLabel = computed62(() => {
|
|
52624
52806
|
const { showFullLabel } = props;
|
|
52625
52807
|
const { fullOptFlag, lazyOptFlag: lazyOptFlag2 } = reactData;
|
|
52626
52808
|
const { fullNodeMaps, lazyNodeMaps } = internalData;
|
|
@@ -52640,7 +52822,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52640
52822
|
return val;
|
|
52641
52823
|
}).join(", ");
|
|
52642
52824
|
});
|
|
52643
|
-
const computePopupWrapperStyle =
|
|
52825
|
+
const computePopupWrapperStyle = computed62(() => {
|
|
52644
52826
|
const popupOpts = computePopupOpts.value;
|
|
52645
52827
|
const { height, width } = popupOpts;
|
|
52646
52828
|
const stys = {};
|
|
@@ -52664,17 +52846,17 @@ var tree_select_default = defineVxeComponent({
|
|
|
52664
52846
|
getComputeMaps: () => computeMaps
|
|
52665
52847
|
};
|
|
52666
52848
|
const dispatchEvent = (type, params, evnt) => {
|
|
52667
|
-
emit(type,
|
|
52849
|
+
emit(type, createEvent82(evnt, { $treeSelect: $xeTreeSelect }, params));
|
|
52668
52850
|
};
|
|
52669
52851
|
const emitModel = (value) => {
|
|
52670
52852
|
emit("update:modelValue", value);
|
|
52671
52853
|
};
|
|
52672
52854
|
const callSlot = (slotFunc, params) => {
|
|
52673
52855
|
if (slotFunc) {
|
|
52674
|
-
if (
|
|
52856
|
+
if (XEUtils112.isString(slotFunc)) {
|
|
52675
52857
|
slotFunc = slots[slotFunc] || null;
|
|
52676
52858
|
}
|
|
52677
|
-
if (
|
|
52859
|
+
if (XEUtils112.isFunction(slotFunc)) {
|
|
52678
52860
|
return getSlotVNs(slotFunc(params));
|
|
52679
52861
|
}
|
|
52680
52862
|
}
|
|
@@ -52723,16 +52905,16 @@ var tree_select_default = defineVxeComponent({
|
|
|
52723
52905
|
};
|
|
52724
52906
|
if (optList) {
|
|
52725
52907
|
if (transform) {
|
|
52726
|
-
const treeList =
|
|
52908
|
+
const treeList = XEUtils112.toArrayTree(optList, {
|
|
52727
52909
|
key: nodeKeyField,
|
|
52728
52910
|
parentKey: nodeParentField,
|
|
52729
52911
|
mapChildren: childrenField,
|
|
52730
52912
|
rootParentValue: treeOpts.rootParentValue,
|
|
52731
52913
|
rootValues: treeOpts.rootValues
|
|
52732
52914
|
});
|
|
52733
|
-
|
|
52915
|
+
XEUtils112.eachTree(treeList, handleOptNode, { children: childrenField });
|
|
52734
52916
|
} else {
|
|
52735
|
-
|
|
52917
|
+
XEUtils112.eachTree(optList, handleOptNode, { children: childrenField });
|
|
52736
52918
|
}
|
|
52737
52919
|
}
|
|
52738
52920
|
return nodeMaps;
|
|
@@ -52752,7 +52934,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52752
52934
|
const popupOpts = computePopupOpts.value;
|
|
52753
52935
|
const customZIndex = popupOpts.zIndex || props.zIndex;
|
|
52754
52936
|
if (customZIndex) {
|
|
52755
|
-
reactData.panelIndex =
|
|
52937
|
+
reactData.panelIndex = XEUtils112.toNumber(customZIndex);
|
|
52756
52938
|
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
52757
52939
|
reactData.panelIndex = nextZIndex();
|
|
52758
52940
|
}
|
|
@@ -52823,7 +53005,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52823
53005
|
dispatchEvent("visible-change", { visible: false }, evnt || null);
|
|
52824
53006
|
};
|
|
52825
53007
|
const changeEvent = (evnt, selectValue, node) => {
|
|
52826
|
-
const value =
|
|
53008
|
+
const value = XEUtils112.isArray(selectValue) ? selectValue.map(deModelValue) : deModelValue(selectValue);
|
|
52827
53009
|
emitModel(value);
|
|
52828
53010
|
if (value !== props.modelValue) {
|
|
52829
53011
|
dispatchEvent("change", { value, node, option: node }, evnt);
|
|
@@ -52850,7 +53032,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52850
53032
|
$tree.setAllCheckboxNode(true).then(({ checkNodeKeys, checkNodes }) => {
|
|
52851
53033
|
changeEvent($event, checkNodeKeys, checkNodes[0]);
|
|
52852
53034
|
dispatchEvent("all-change", { value: checkNodeKeys }, $event);
|
|
52853
|
-
if (
|
|
53035
|
+
if (XEUtils112.isBoolean(checkedClosable) ? checkedClosable : autoClose) {
|
|
52854
53036
|
hideOptionPanel($event);
|
|
52855
53037
|
}
|
|
52856
53038
|
});
|
|
@@ -52864,7 +53046,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
52864
53046
|
if ($tree) {
|
|
52865
53047
|
const value = multiple ? [] : null;
|
|
52866
53048
|
$tree.clearCheckboxNode().then(() => {
|
|
52867
|
-
if (
|
|
53049
|
+
if (XEUtils112.isBoolean(clearClosable) ? clearClosable : autoClose) {
|
|
52868
53050
|
hideOptionPanel($event);
|
|
52869
53051
|
}
|
|
52870
53052
|
});
|
|
@@ -53054,7 +53236,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
53054
53236
|
const virtualYOpts = computeVirtualYOpts.value;
|
|
53055
53237
|
const filterOpts = computeFilterOpts.value;
|
|
53056
53238
|
const { slots: treeSlots } = treeOpts;
|
|
53057
|
-
const selectVals =
|
|
53239
|
+
const selectVals = XEUtils112.eqNull(modelValue) ? [] : XEUtils112.isArray(modelValue) ? modelValue : [modelValue];
|
|
53058
53240
|
const treeScopedSlots = {};
|
|
53059
53241
|
if (treeSlots) {
|
|
53060
53242
|
const { icon: treeIconSlot, title: treeTitleSlot, extra: treeExtraSlot } = treeSlots;
|
|
@@ -53074,7 +53256,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
53074
53256
|
ref: refElem,
|
|
53075
53257
|
class: [
|
|
53076
53258
|
"vxe-tree-select",
|
|
53077
|
-
className ?
|
|
53259
|
+
className ? XEUtils112.isFunction(className) ? className({ $treeSelect: $xeTreeSelect }) : className : "",
|
|
53078
53260
|
{
|
|
53079
53261
|
[`size--${vSize}`]: vSize,
|
|
53080
53262
|
"is--filterable": filterable,
|
|
@@ -53122,7 +53304,7 @@ var tree_select_default = defineVxeComponent({
|
|
|
53122
53304
|
ref: refOptionPanel,
|
|
53123
53305
|
class: [
|
|
53124
53306
|
"vxe-table--ignore-clear vxe-tree-select--panel",
|
|
53125
|
-
ppClassName ?
|
|
53307
|
+
ppClassName ? XEUtils112.isFunction(ppClassName) ? ppClassName({ $treeSelect: $xeTreeSelect }) : ppClassName : "",
|
|
53126
53308
|
{
|
|
53127
53309
|
[`size--${vSize}`]: vSize,
|
|
53128
53310
|
"is--transfer": btnTransfer,
|
|
@@ -53326,41 +53508,41 @@ var tree_select_default = defineVxeComponent({
|
|
|
53326
53508
|
);
|
|
53327
53509
|
};
|
|
53328
53510
|
const optFlag = ref80(0);
|
|
53329
|
-
|
|
53511
|
+
watch50(
|
|
53330
53512
|
() => props.options ? props.options.length : -1,
|
|
53331
53513
|
() => {
|
|
53332
53514
|
optFlag.value++;
|
|
53333
53515
|
}
|
|
53334
53516
|
);
|
|
53335
|
-
|
|
53517
|
+
watch50(
|
|
53336
53518
|
() => props.options,
|
|
53337
53519
|
() => {
|
|
53338
53520
|
optFlag.value++;
|
|
53339
53521
|
}
|
|
53340
53522
|
);
|
|
53341
|
-
|
|
53523
|
+
watch50(optFlag, () => {
|
|
53342
53524
|
cacheDataMap();
|
|
53343
53525
|
});
|
|
53344
53526
|
const lazyOptFlag = ref80(0);
|
|
53345
|
-
|
|
53527
|
+
watch50(
|
|
53346
53528
|
() => props.lazyOptions ? props.lazyOptions.length : -1,
|
|
53347
53529
|
() => {
|
|
53348
53530
|
lazyOptFlag.value++;
|
|
53349
53531
|
}
|
|
53350
53532
|
);
|
|
53351
|
-
|
|
53533
|
+
watch50(
|
|
53352
53534
|
() => props.lazyOptions,
|
|
53353
53535
|
() => {
|
|
53354
53536
|
lazyOptFlag.value++;
|
|
53355
53537
|
}
|
|
53356
53538
|
);
|
|
53357
|
-
|
|
53539
|
+
watch50(lazyOptFlag, () => {
|
|
53358
53540
|
cacheLazyDataMap();
|
|
53359
53541
|
});
|
|
53360
53542
|
cacheDataMap();
|
|
53361
53543
|
cacheLazyDataMap();
|
|
53362
|
-
|
|
53363
|
-
if (
|
|
53544
|
+
onMounted54(() => {
|
|
53545
|
+
if (XEUtils112.isBoolean(props.autoClose)) {
|
|
53364
53546
|
warnLog19("vxe.error.delProp", ["auto-close", "checked-closable | clear-closable"]);
|
|
53365
53547
|
}
|
|
53366
53548
|
globalEvents26.on($xeTreeSelect, "mousedown", handleGlobalMousedownEvent);
|
|
@@ -53368,15 +53550,15 @@ var tree_select_default = defineVxeComponent({
|
|
|
53368
53550
|
globalEvents26.on($xeTreeSelect, "resize", handleGlobalResizeEvent);
|
|
53369
53551
|
globalEvents26.on($xeTreeSelect, "scroll", handleGlobalScrollEvent);
|
|
53370
53552
|
});
|
|
53371
|
-
|
|
53553
|
+
onBeforeUnmount24(() => {
|
|
53372
53554
|
globalEvents26.off($xeTreeSelect, "mousedown");
|
|
53373
53555
|
globalEvents26.off($xeTreeSelect, "blur");
|
|
53374
53556
|
globalEvents26.off($xeTreeSelect, "resize");
|
|
53375
53557
|
globalEvents26.off($xeTreeSelect, "scroll");
|
|
53376
|
-
|
|
53377
|
-
|
|
53558
|
+
XEUtils112.assign(reactData, createReactData27());
|
|
53559
|
+
XEUtils112.assign(internalData, createInternalData26());
|
|
53378
53560
|
});
|
|
53379
|
-
|
|
53561
|
+
provide33("$xeTreeSelect", $xeTreeSelect);
|
|
53380
53562
|
$xeTreeSelect.renderVN = renderVN;
|
|
53381
53563
|
return $xeTreeSelect;
|
|
53382
53564
|
},
|
|
@@ -53392,23 +53574,23 @@ var VxeTreeSelect = Object.assign({}, tree_select_default, {
|
|
|
53392
53574
|
}
|
|
53393
53575
|
});
|
|
53394
53576
|
dynamicApp.use(VxeTreeSelect);
|
|
53395
|
-
|
|
53577
|
+
VxeUI187.component(tree_select_default);
|
|
53396
53578
|
var TreeSelect = VxeTreeSelect;
|
|
53397
53579
|
var tree_select_default2 = VxeTreeSelect;
|
|
53398
53580
|
|
|
53399
53581
|
// packages_temp/upload/src/upload.ts
|
|
53400
|
-
import { ref as ref81, h as h95, reactive as
|
|
53401
|
-
import
|
|
53402
|
-
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";
|
|
53403
53585
|
|
|
53404
53586
|
// packages_temp/upload/src/util.ts
|
|
53405
|
-
import
|
|
53406
|
-
import { VxeUI as
|
|
53587
|
+
import XEUtils113 from "xe-utils";
|
|
53588
|
+
import { VxeUI as VxeUI188, getI18n as getI18n28 } from "@vxe-ui/core";
|
|
53407
53589
|
var fileForm = null;
|
|
53408
53590
|
var fileInput = null;
|
|
53409
53591
|
function parseFile(file) {
|
|
53410
53592
|
const name = file.name;
|
|
53411
|
-
const tIndex =
|
|
53593
|
+
const tIndex = XEUtils113.lastIndexOf(name, ".");
|
|
53412
53594
|
const type = name.substring(tIndex + 1, name.length).toLowerCase();
|
|
53413
53595
|
const filename = name.substring(0, tIndex);
|
|
53414
53596
|
return { filename, type };
|
|
@@ -53439,7 +53621,7 @@ var readLocalFile = (options) => {
|
|
|
53439
53621
|
if (!isAllType) {
|
|
53440
53622
|
for (let fIndex = 0; fIndex < files.length; fIndex++) {
|
|
53441
53623
|
const { type } = parseFile(files[fIndex]);
|
|
53442
|
-
if (!
|
|
53624
|
+
if (!XEUtils113.includes(types, type)) {
|
|
53443
53625
|
errType = type;
|
|
53444
53626
|
break;
|
|
53445
53627
|
}
|
|
@@ -53449,8 +53631,8 @@ var readLocalFile = (options) => {
|
|
|
53449
53631
|
resolve({ status: true, files, file });
|
|
53450
53632
|
} else {
|
|
53451
53633
|
if (opts.message !== false) {
|
|
53452
|
-
if (
|
|
53453
|
-
|
|
53634
|
+
if (VxeUI188.modal) {
|
|
53635
|
+
VxeUI188.modal.message({
|
|
53454
53636
|
content: getI18n28("vxe.error.notType", [errType]),
|
|
53455
53637
|
status: "error"
|
|
53456
53638
|
});
|
|
@@ -53472,7 +53654,7 @@ var saveLocalFile = (options) => {
|
|
|
53472
53654
|
const { filename, type, content } = opts;
|
|
53473
53655
|
const name = type ? `${filename}.${type}` : `${filename}`;
|
|
53474
53656
|
if (window.Blob) {
|
|
53475
|
-
const blob = content instanceof Blob ? content : getExportBlobByContent(
|
|
53657
|
+
const blob = content instanceof Blob ? content : getExportBlobByContent(XEUtils113.toValueString(content), opts);
|
|
53476
53658
|
const winNavigator = window.navigator;
|
|
53477
53659
|
if (winNavigator.msSaveBlob) {
|
|
53478
53660
|
winNavigator.msSaveBlob(blob, name);
|
|
@@ -53497,9 +53679,9 @@ var saveLocalFile = (options) => {
|
|
|
53497
53679
|
};
|
|
53498
53680
|
|
|
53499
53681
|
// packages_temp/upload/src/upload.ts
|
|
53500
|
-
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;
|
|
53501
53683
|
var { warnLog: warnLog20, errLog: errLog23 } = createComponentLog("upload");
|
|
53502
|
-
function
|
|
53684
|
+
function createReactData28() {
|
|
53503
53685
|
return {
|
|
53504
53686
|
isDragUploadStatus: false,
|
|
53505
53687
|
showMorePopup: false,
|
|
@@ -53511,9 +53693,9 @@ function createReactData27() {
|
|
|
53511
53693
|
dragTipText: ""
|
|
53512
53694
|
};
|
|
53513
53695
|
}
|
|
53514
|
-
function
|
|
53696
|
+
function createInternalData27() {
|
|
53515
53697
|
return {
|
|
53516
|
-
moreId:
|
|
53698
|
+
moreId: XEUtils114.uniqueId("upload"),
|
|
53517
53699
|
imagePreviewTypes: ["jpg", "jpeg", "png", "gif"],
|
|
53518
53700
|
prevDragIndex: -1
|
|
53519
53701
|
// prevDragPos: ''
|
|
@@ -53546,11 +53728,11 @@ var upload_default = defineVxeComponent({
|
|
|
53546
53728
|
},
|
|
53547
53729
|
imageTypes: {
|
|
53548
53730
|
type: Array,
|
|
53549
|
-
default: () =>
|
|
53731
|
+
default: () => XEUtils114.clone(getConfig74().upload.imageTypes, true)
|
|
53550
53732
|
},
|
|
53551
53733
|
imageConfig: {
|
|
53552
53734
|
type: Object,
|
|
53553
|
-
default: () =>
|
|
53735
|
+
default: () => XEUtils114.clone(getConfig74().upload.imageConfig, true)
|
|
53554
53736
|
},
|
|
53555
53737
|
/**
|
|
53556
53738
|
* 已废弃,被 image-config 替换
|
|
@@ -53558,16 +53740,16 @@ var upload_default = defineVxeComponent({
|
|
|
53558
53740
|
*/
|
|
53559
53741
|
imageStyle: {
|
|
53560
53742
|
type: Object,
|
|
53561
|
-
default: () =>
|
|
53743
|
+
default: () => XEUtils114.clone(getConfig74().upload.imageStyle, true)
|
|
53562
53744
|
},
|
|
53563
53745
|
fileTypes: {
|
|
53564
53746
|
type: Array,
|
|
53565
|
-
default: () =>
|
|
53747
|
+
default: () => XEUtils114.clone(getConfig74().upload.fileTypes, true)
|
|
53566
53748
|
},
|
|
53567
53749
|
dragSort: Boolean,
|
|
53568
53750
|
dragToUpload: {
|
|
53569
53751
|
type: Boolean,
|
|
53570
|
-
default: () =>
|
|
53752
|
+
default: () => XEUtils114.clone(getConfig74().upload.dragToUpload, true)
|
|
53571
53753
|
},
|
|
53572
53754
|
dragPlaceholder: {
|
|
53573
53755
|
type: String,
|
|
@@ -53575,7 +53757,7 @@ var upload_default = defineVxeComponent({
|
|
|
53575
53757
|
},
|
|
53576
53758
|
pasteToUpload: {
|
|
53577
53759
|
type: Boolean,
|
|
53578
|
-
default: () =>
|
|
53760
|
+
default: () => XEUtils114.clone(getConfig74().upload.pasteToUpload, true)
|
|
53579
53761
|
},
|
|
53580
53762
|
keyField: String,
|
|
53581
53763
|
singleMode: Boolean,
|
|
@@ -53702,21 +53884,21 @@ var upload_default = defineVxeComponent({
|
|
|
53702
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"],
|
|
53703
53885
|
setup(props, context) {
|
|
53704
53886
|
const { emit, slots } = context;
|
|
53705
|
-
const $xeForm =
|
|
53706
|
-
const formItemInfo =
|
|
53707
|
-
const $xeTable =
|
|
53708
|
-
const xID =
|
|
53709
|
-
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);
|
|
53710
53892
|
const refElem = ref81();
|
|
53711
53893
|
const refPopupElem = ref81();
|
|
53712
53894
|
const refDragLineElem = ref81();
|
|
53713
53895
|
const refModalDragLineElem = ref81();
|
|
53714
|
-
const reactData =
|
|
53715
|
-
const internalData =
|
|
53896
|
+
const reactData = reactive87(createReactData28());
|
|
53897
|
+
const internalData = createInternalData27();
|
|
53716
53898
|
const refMaps = {
|
|
53717
53899
|
refElem
|
|
53718
53900
|
};
|
|
53719
|
-
const computeFormReadonly =
|
|
53901
|
+
const computeFormReadonly = computed63(() => {
|
|
53720
53902
|
const { readonly } = props;
|
|
53721
53903
|
if (readonly === null) {
|
|
53722
53904
|
if ($xeForm) {
|
|
@@ -53726,7 +53908,7 @@ var upload_default = defineVxeComponent({
|
|
|
53726
53908
|
}
|
|
53727
53909
|
return readonly;
|
|
53728
53910
|
});
|
|
53729
|
-
const computeIsDisabled =
|
|
53911
|
+
const computeIsDisabled = computed63(() => {
|
|
53730
53912
|
const { disabled } = props;
|
|
53731
53913
|
if (disabled === null) {
|
|
53732
53914
|
if ($xeForm) {
|
|
@@ -53736,31 +53918,31 @@ var upload_default = defineVxeComponent({
|
|
|
53736
53918
|
}
|
|
53737
53919
|
return disabled;
|
|
53738
53920
|
});
|
|
53739
|
-
const computeKeyField =
|
|
53921
|
+
const computeKeyField = computed63(() => {
|
|
53740
53922
|
return props.keyField || "_X_KEY";
|
|
53741
53923
|
});
|
|
53742
|
-
const computeIsImage =
|
|
53924
|
+
const computeIsImage = computed63(() => {
|
|
53743
53925
|
return props.mode === "image";
|
|
53744
53926
|
});
|
|
53745
|
-
const computeNameProp =
|
|
53927
|
+
const computeNameProp = computed63(() => {
|
|
53746
53928
|
return props.nameField || "name";
|
|
53747
53929
|
});
|
|
53748
|
-
const computeTypeProp =
|
|
53930
|
+
const computeTypeProp = computed63(() => {
|
|
53749
53931
|
return props.typeField || "type";
|
|
53750
53932
|
});
|
|
53751
|
-
const computeUrlProp =
|
|
53933
|
+
const computeUrlProp = computed63(() => {
|
|
53752
53934
|
return props.urlField || "url";
|
|
53753
53935
|
});
|
|
53754
|
-
const computeSizeProp =
|
|
53936
|
+
const computeSizeProp = computed63(() => {
|
|
53755
53937
|
return props.sizeField || "size";
|
|
53756
53938
|
});
|
|
53757
|
-
const computeLimitMaxSize =
|
|
53758
|
-
return
|
|
53939
|
+
const computeLimitMaxSize = computed63(() => {
|
|
53940
|
+
return XEUtils114.toNumber(props.limitSize) * 1024 * 1024;
|
|
53759
53941
|
});
|
|
53760
|
-
const computeLimitMaxCount =
|
|
53761
|
-
return props.multiple ?
|
|
53942
|
+
const computeLimitMaxCount = computed63(() => {
|
|
53943
|
+
return props.multiple ? XEUtils114.toNumber(props.limitCount) : 1;
|
|
53762
53944
|
});
|
|
53763
|
-
const computePreviewImageOpts =
|
|
53945
|
+
const computePreviewImageOpts = computed63(() => {
|
|
53764
53946
|
const { showDownloadButton } = props;
|
|
53765
53947
|
return Object.assign(
|
|
53766
53948
|
{
|
|
@@ -53770,7 +53952,7 @@ var upload_default = defineVxeComponent({
|
|
|
53770
53952
|
props.previewImageConfig
|
|
53771
53953
|
);
|
|
53772
53954
|
});
|
|
53773
|
-
const computeOverCount =
|
|
53955
|
+
const computeOverCount = computed63(() => {
|
|
53774
53956
|
const { multiple } = props;
|
|
53775
53957
|
const { fileList } = reactData;
|
|
53776
53958
|
const limitMaxCount = computeLimitMaxCount.value;
|
|
@@ -53782,8 +53964,8 @@ var upload_default = defineVxeComponent({
|
|
|
53782
53964
|
}
|
|
53783
53965
|
return fileList.length >= 1;
|
|
53784
53966
|
});
|
|
53785
|
-
const computeLimitSizeUnit =
|
|
53786
|
-
const limitSize =
|
|
53967
|
+
const computeLimitSizeUnit = computed63(() => {
|
|
53968
|
+
const limitSize = XEUtils114.toNumber(props.limitSize);
|
|
53787
53969
|
if (limitSize) {
|
|
53788
53970
|
if (limitSize > 1048576) {
|
|
53789
53971
|
return `${limitSize / 1048576}T`;
|
|
@@ -53795,13 +53977,13 @@ var upload_default = defineVxeComponent({
|
|
|
53795
53977
|
}
|
|
53796
53978
|
return "";
|
|
53797
53979
|
});
|
|
53798
|
-
const computedShowTipText =
|
|
53980
|
+
const computedShowTipText = computed63(() => {
|
|
53799
53981
|
const { showTip, tipText } = props;
|
|
53800
|
-
if (
|
|
53982
|
+
if (XEUtils114.isBoolean(showTip)) {
|
|
53801
53983
|
return showTip;
|
|
53802
53984
|
}
|
|
53803
53985
|
const defShowTip = getConfig74().upload.showTip;
|
|
53804
|
-
if (
|
|
53986
|
+
if (XEUtils114.isBoolean(defShowTip)) {
|
|
53805
53987
|
return defShowTip;
|
|
53806
53988
|
}
|
|
53807
53989
|
if (tipText) {
|
|
@@ -53809,15 +53991,15 @@ var upload_default = defineVxeComponent({
|
|
|
53809
53991
|
}
|
|
53810
53992
|
return false;
|
|
53811
53993
|
});
|
|
53812
|
-
const computedDefTipText =
|
|
53994
|
+
const computedDefTipText = computed63(() => {
|
|
53813
53995
|
const { limitSize, fileTypes, multiple, limitCount } = props;
|
|
53814
53996
|
const tipText = props.tipText || props.hintText;
|
|
53815
53997
|
const isImage = computeIsImage.value;
|
|
53816
53998
|
const limitSizeUnit = computeLimitSizeUnit.value;
|
|
53817
|
-
if (
|
|
53999
|
+
if (XEUtils114.isString(tipText)) {
|
|
53818
54000
|
return tipText;
|
|
53819
54001
|
}
|
|
53820
|
-
if (
|
|
54002
|
+
if (XEUtils114.isFunction(tipText)) {
|
|
53821
54003
|
return `${tipText({})}`;
|
|
53822
54004
|
}
|
|
53823
54005
|
const defTips = [];
|
|
@@ -53841,10 +54023,10 @@ var upload_default = defineVxeComponent({
|
|
|
53841
54023
|
}
|
|
53842
54024
|
return defTips.join(getI18n29("vxe.base.comma"));
|
|
53843
54025
|
});
|
|
53844
|
-
const computeImageOpts =
|
|
54026
|
+
const computeImageOpts = computed63(() => {
|
|
53845
54027
|
return Object.assign({}, props.imageConfig || props.imageStyle);
|
|
53846
54028
|
});
|
|
53847
|
-
const computeImgStyle =
|
|
54029
|
+
const computeImgStyle = computed63(() => {
|
|
53848
54030
|
const imageOpts = computeImageOpts.value;
|
|
53849
54031
|
const { width, height } = imageOpts;
|
|
53850
54032
|
const stys = {};
|
|
@@ -53856,7 +54038,7 @@ var upload_default = defineVxeComponent({
|
|
|
53856
54038
|
}
|
|
53857
54039
|
return stys;
|
|
53858
54040
|
});
|
|
53859
|
-
const computeMoreOpts =
|
|
54041
|
+
const computeMoreOpts = computed63(() => {
|
|
53860
54042
|
return Object.assign({ showMoreButton: true }, props.moreConfig);
|
|
53861
54043
|
});
|
|
53862
54044
|
const computeMaps = {
|
|
@@ -53872,7 +54054,7 @@ var upload_default = defineVxeComponent({
|
|
|
53872
54054
|
getComputeMaps: () => computeMaps
|
|
53873
54055
|
};
|
|
53874
54056
|
const getUniqueKey = () => {
|
|
53875
|
-
return
|
|
54057
|
+
return XEUtils114.uniqueId();
|
|
53876
54058
|
};
|
|
53877
54059
|
const getFieldKey = (item) => {
|
|
53878
54060
|
const keyField = computeKeyField.value;
|
|
@@ -53886,16 +54068,16 @@ var upload_default = defineVxeComponent({
|
|
|
53886
54068
|
const typeProp = computeTypeProp.value;
|
|
53887
54069
|
const urlProp = computeUrlProp.value;
|
|
53888
54070
|
const sizeProp = computeSizeProp.value;
|
|
53889
|
-
const fileList = modelValue ? (modelValue ?
|
|
53890
|
-
if (!item ||
|
|
54071
|
+
const fileList = modelValue ? (modelValue ? XEUtils114.isArray(modelValue) ? modelValue : [modelValue] : []).map((item) => {
|
|
54072
|
+
if (!item || XEUtils114.isString(item)) {
|
|
53891
54073
|
const url = `${item || ""}`;
|
|
53892
|
-
const urlObj =
|
|
54074
|
+
const urlObj = XEUtils114.parseUrl(item);
|
|
53893
54075
|
const name2 = (urlObj ? urlObj.searchQuery[nameProp] : "") || parseFileName(url);
|
|
53894
54076
|
return {
|
|
53895
54077
|
[nameProp]: name2,
|
|
53896
54078
|
[typeProp]: (urlObj ? urlObj.searchQuery[typeProp] : "") || parseFileType(name2),
|
|
53897
54079
|
[urlProp]: url,
|
|
53898
|
-
[sizeProp]:
|
|
54080
|
+
[sizeProp]: XEUtils114.toNumber(urlObj ? urlObj.searchQuery[sizeProp] : 0) || 0,
|
|
53899
54081
|
[keyField]: getUniqueKey()
|
|
53900
54082
|
};
|
|
53901
54083
|
}
|
|
@@ -53920,7 +54102,7 @@ var upload_default = defineVxeComponent({
|
|
|
53920
54102
|
return "";
|
|
53921
54103
|
};
|
|
53922
54104
|
const dispatchEvent = (type, params, evnt) => {
|
|
53923
|
-
emit(type,
|
|
54105
|
+
emit(type, createEvent83(evnt, { $upload: $xeUpload }, params));
|
|
53924
54106
|
};
|
|
53925
54107
|
const emitModel = (value) => {
|
|
53926
54108
|
emit("update:modelValue", value);
|
|
@@ -53934,7 +54116,7 @@ var upload_default = defineVxeComponent({
|
|
|
53934
54116
|
restList = restList.map((item) => {
|
|
53935
54117
|
const url = item[urlProp];
|
|
53936
54118
|
if (url && urlArgs) {
|
|
53937
|
-
const urlObj =
|
|
54119
|
+
const urlObj = XEUtils114.parseUrl(url);
|
|
53938
54120
|
if (!urlObj.searchQuery[nameProp]) {
|
|
53939
54121
|
if (url.indexOf("blob:") === -1) {
|
|
53940
54122
|
return `${url}${url.indexOf("?") === -1 ? "?" : "&"}${nameProp}=${encodeURIComponent(item[nameProp] || "")}`;
|
|
@@ -53978,8 +54160,8 @@ var upload_default = defineVxeComponent({
|
|
|
53978
54160
|
const beforeDownloadFn = props.beforeDownloadMethod || getConfig74().upload.beforeDownloadMethod;
|
|
53979
54161
|
const { imagePreviewTypes } = internalData;
|
|
53980
54162
|
if (imagePreviewTypes.concat(imageTypes || []).some((type) => `${type}`.toLowerCase() === `${item[typeProp]}`.toLowerCase())) {
|
|
53981
|
-
if (
|
|
53982
|
-
|
|
54163
|
+
if (VxeUI189.previewImage) {
|
|
54164
|
+
VxeUI189.previewImage({
|
|
53983
54165
|
...previewImageOpts,
|
|
53984
54166
|
urlList: [getFileUrl(item)],
|
|
53985
54167
|
showDownloadButton,
|
|
@@ -54018,8 +54200,8 @@ var upload_default = defineVxeComponent({
|
|
|
54018
54200
|
$upload: $xeUpload,
|
|
54019
54201
|
option: item
|
|
54020
54202
|
});
|
|
54021
|
-
} else if (
|
|
54022
|
-
|
|
54203
|
+
} else if (VxeUI189.previewImage) {
|
|
54204
|
+
VxeUI189.previewImage({
|
|
54023
54205
|
...previewImageOpts,
|
|
54024
54206
|
urlList: fileList.map((item2) => getFileUrl(item2)),
|
|
54025
54207
|
activeIndex: index,
|
|
@@ -54049,7 +54231,7 @@ var upload_default = defineVxeComponent({
|
|
|
54049
54231
|
const { fileCacheMaps } = reactData;
|
|
54050
54232
|
const cacheItem = fileCacheMaps[getFieldKey(item)];
|
|
54051
54233
|
if (cacheItem) {
|
|
54052
|
-
cacheItem.percent = Math.max(0, Math.min(99,
|
|
54234
|
+
cacheItem.percent = Math.max(0, Math.min(99, XEUtils114.toNumber(percentNum)));
|
|
54053
54235
|
}
|
|
54054
54236
|
}
|
|
54055
54237
|
})
|
|
@@ -54135,11 +54317,11 @@ var upload_default = defineVxeComponent({
|
|
|
54135
54317
|
let selectFiles = files;
|
|
54136
54318
|
if (multiple && limitMaxCount) {
|
|
54137
54319
|
if (showLimitCount && fileList.length >= limitMaxCount) {
|
|
54138
|
-
if (
|
|
54139
|
-
|
|
54320
|
+
if (VxeUI189.modal) {
|
|
54321
|
+
VxeUI189.modal.notification({
|
|
54140
54322
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54141
54323
|
status: "error",
|
|
54142
|
-
content: limitCountText ? `${
|
|
54324
|
+
content: limitCountText ? `${XEUtils114.isFunction(limitCountText) ? limitCountText({ maxCount: limitMaxCount }) : limitCountText}` : getI18n29("vxe.upload.overCountErr", [limitMaxCount])
|
|
54143
54325
|
});
|
|
54144
54326
|
}
|
|
54145
54327
|
return;
|
|
@@ -54148,13 +54330,13 @@ var upload_default = defineVxeComponent({
|
|
|
54148
54330
|
if (showLimitCount && overNum > 0) {
|
|
54149
54331
|
const overExtraList = selectFiles.slice(limitMaxCount - fileList.length);
|
|
54150
54332
|
if (limitCountText) {
|
|
54151
|
-
|
|
54333
|
+
VxeUI189.modal.notification({
|
|
54152
54334
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54153
54335
|
status: "error",
|
|
54154
|
-
content: `${
|
|
54336
|
+
content: `${XEUtils114.isFunction(limitCountText) ? limitCountText({ maxCount: limitMaxCount }) : limitCountText}`
|
|
54155
54337
|
});
|
|
54156
|
-
} else if (
|
|
54157
|
-
|
|
54338
|
+
} else if (VxeUI189.modal) {
|
|
54339
|
+
VxeUI189.modal.notification({
|
|
54158
54340
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54159
54341
|
status: "error",
|
|
54160
54342
|
width: null,
|
|
@@ -54196,11 +54378,11 @@ var upload_default = defineVxeComponent({
|
|
|
54196
54378
|
for (let i = 0; i < files.length; i++) {
|
|
54197
54379
|
const file = files[0];
|
|
54198
54380
|
if (file.size > limitMaxSize) {
|
|
54199
|
-
if (
|
|
54200
|
-
|
|
54381
|
+
if (VxeUI189.modal) {
|
|
54382
|
+
VxeUI189.modal.notification({
|
|
54201
54383
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54202
54384
|
status: "error",
|
|
54203
|
-
content: limitSizeText ? `${
|
|
54385
|
+
content: limitSizeText ? `${XEUtils114.isFunction(limitSizeText) ? limitSizeText({ maxSize: limitMaxSize }) : limitSizeText}` : getI18n29("vxe.upload.overSizeErr", [limitSizeUnit])
|
|
54204
54386
|
});
|
|
54205
54387
|
}
|
|
54206
54388
|
return;
|
|
@@ -54231,7 +54413,7 @@ var upload_default = defineVxeComponent({
|
|
|
54231
54413
|
response: null
|
|
54232
54414
|
};
|
|
54233
54415
|
}
|
|
54234
|
-
const item =
|
|
54416
|
+
const item = reactive87(fileObj);
|
|
54235
54417
|
if (!beforeSelectFn || beforeSelectFn({ $upload: $xeUpload, file })) {
|
|
54236
54418
|
if (uploadFn && autoSubmit) {
|
|
54237
54419
|
uploadPromiseRests.push(handleUploadResult(item, file));
|
|
@@ -54401,8 +54583,8 @@ var upload_default = defineVxeComponent({
|
|
|
54401
54583
|
}
|
|
54402
54584
|
});
|
|
54403
54585
|
if (errTypes.length) {
|
|
54404
|
-
if (
|
|
54405
|
-
|
|
54586
|
+
if (VxeUI189.modal) {
|
|
54587
|
+
VxeUI189.modal.message({
|
|
54406
54588
|
content: getI18n29("vxe.error.notType", [errTypes.join(", ")]),
|
|
54407
54589
|
status: "error"
|
|
54408
54590
|
});
|
|
@@ -54412,8 +54594,8 @@ var upload_default = defineVxeComponent({
|
|
|
54412
54594
|
}
|
|
54413
54595
|
}
|
|
54414
54596
|
if (!files.length) {
|
|
54415
|
-
if (
|
|
54416
|
-
|
|
54597
|
+
if (VxeUI189.modal) {
|
|
54598
|
+
VxeUI189.modal.notification({
|
|
54417
54599
|
title: getI18n29("vxe.modal.errTitle"),
|
|
54418
54600
|
status: "error",
|
|
54419
54601
|
content: getI18n29("vxe.upload.uploadTypeErr")
|
|
@@ -54439,7 +54621,7 @@ var upload_default = defineVxeComponent({
|
|
|
54439
54621
|
};
|
|
54440
54622
|
const handleTransferFiles = (items) => {
|
|
54441
54623
|
const files = [];
|
|
54442
|
-
|
|
54624
|
+
XEUtils114.arrayEach(items, (item) => {
|
|
54443
54625
|
const file = item.getAsFile();
|
|
54444
54626
|
if (file) {
|
|
54445
54627
|
files.push(file);
|
|
@@ -54451,8 +54633,8 @@ var upload_default = defineVxeComponent({
|
|
|
54451
54633
|
const formReadonly = computeFormReadonly.value;
|
|
54452
54634
|
const isImage = computeIsImage.value;
|
|
54453
54635
|
const evnt = evntParams.$event;
|
|
54454
|
-
if (
|
|
54455
|
-
|
|
54636
|
+
if (VxeUI189.modal) {
|
|
54637
|
+
VxeUI189.modal.open({
|
|
54456
54638
|
id: internalData.moreId,
|
|
54457
54639
|
title: formReadonly ? getI18n29("vxe.upload.morePopup.readTitle") : getI18n29(`vxe.upload.morePopup.${isImage ? "imageTitle" : "fileTitle"}`),
|
|
54458
54640
|
width: 660,
|
|
@@ -54602,7 +54784,7 @@ var upload_default = defineVxeComponent({
|
|
|
54602
54784
|
}
|
|
54603
54785
|
const dragEl = evnt.currentTarget;
|
|
54604
54786
|
const parentEl = dragEl.parentElement;
|
|
54605
|
-
const dragIndex =
|
|
54787
|
+
const dragIndex = XEUtils114.findIndexOf(Array.from(parentEl.children), (item) => dragEl === item);
|
|
54606
54788
|
reactData.isDragMove = true;
|
|
54607
54789
|
reactData.dragIndex = dragIndex;
|
|
54608
54790
|
setTimeout(() => {
|
|
@@ -54619,7 +54801,7 @@ var upload_default = defineVxeComponent({
|
|
|
54619
54801
|
const isImage = computeIsImage.value;
|
|
54620
54802
|
const dragEl = evnt.currentTarget;
|
|
54621
54803
|
const parentEl = dragEl.parentElement;
|
|
54622
|
-
const currIndex =
|
|
54804
|
+
const currIndex = XEUtils114.findIndexOf(Array.from(parentEl.children), (item) => dragEl === item);
|
|
54623
54805
|
let dragPos = "";
|
|
54624
54806
|
if (isImage) {
|
|
54625
54807
|
const offsetX = evnt.clientX - dragEl.getBoundingClientRect().x;
|
|
@@ -54646,7 +54828,7 @@ var upload_default = defineVxeComponent({
|
|
|
54646
54828
|
const newItem = fileList[targetIndex];
|
|
54647
54829
|
if (oldItem && newItem) {
|
|
54648
54830
|
fileList.splice(oldIndex, 1);
|
|
54649
|
-
const ptfIndex =
|
|
54831
|
+
const ptfIndex = XEUtils114.findIndexOf(fileList, (item) => newItem === item);
|
|
54650
54832
|
const nIndex = ptfIndex + dragOffsetIndex;
|
|
54651
54833
|
fileList.splice(nIndex, 0, oldItem);
|
|
54652
54834
|
dispatchEvent(
|
|
@@ -54711,7 +54893,7 @@ var upload_default = defineVxeComponent({
|
|
|
54711
54893
|
const { fileList } = reactData;
|
|
54712
54894
|
const urlProp = computeUrlProp.value;
|
|
54713
54895
|
const rest = [];
|
|
54714
|
-
|
|
54896
|
+
XEUtils114.lastEach(fileList, (item, index) => {
|
|
54715
54897
|
rest.push(
|
|
54716
54898
|
removeFileEvent(evnt, item, index).then((status) => {
|
|
54717
54899
|
return { url: item[urlProp], status };
|
|
@@ -54723,12 +54905,12 @@ var upload_default = defineVxeComponent({
|
|
|
54723
54905
|
const handleRemoveFile = (evnt, urlOrItem) => {
|
|
54724
54906
|
const { fileList } = reactData;
|
|
54725
54907
|
const urlProp = computeUrlProp.value;
|
|
54726
|
-
const urls =
|
|
54908
|
+
const urls = XEUtils114.isArray(urlOrItem) ? urlOrItem : [urlOrItem];
|
|
54727
54909
|
const rest = [];
|
|
54728
54910
|
urls.forEach((obj) => {
|
|
54729
54911
|
if (obj) {
|
|
54730
|
-
const url =
|
|
54731
|
-
const index =
|
|
54912
|
+
const url = XEUtils114.isString(obj) ? obj : obj[urlProp];
|
|
54913
|
+
const index = XEUtils114.findIndexOf(fileList, (fileItem) => fileItem[urlProp] === url);
|
|
54732
54914
|
if (index > -1) {
|
|
54733
54915
|
rest.push(
|
|
54734
54916
|
removeFileEvent(evnt, fileList[index], index).then((status) => {
|
|
@@ -54765,7 +54947,7 @@ var upload_default = defineVxeComponent({
|
|
|
54765
54947
|
},
|
|
54766
54948
|
submit(isFull) {
|
|
54767
54949
|
const { maxSimultaneousUploads } = props;
|
|
54768
|
-
const msNum =
|
|
54950
|
+
const msNum = XEUtils114.toNumber(maxSimultaneousUploads || 1) || 1;
|
|
54769
54951
|
const { fileList, fileCacheMaps } = reactData;
|
|
54770
54952
|
const allPendingList = fileList.filter((item) => {
|
|
54771
54953
|
const fileKey = getFieldKey(item);
|
|
@@ -54808,8 +54990,8 @@ var upload_default = defineVxeComponent({
|
|
|
54808
54990
|
return nextTick36();
|
|
54809
54991
|
},
|
|
54810
54992
|
closeMore() {
|
|
54811
|
-
if (
|
|
54812
|
-
|
|
54993
|
+
if (VxeUI189.modal) {
|
|
54994
|
+
VxeUI189.modal.close(internalData.moreId);
|
|
54813
54995
|
}
|
|
54814
54996
|
return nextTick36();
|
|
54815
54997
|
},
|
|
@@ -54911,7 +55093,7 @@ var upload_default = defineVxeComponent({
|
|
|
54911
55093
|
{
|
|
54912
55094
|
class: "vxe-upload--file-item-loading-text"
|
|
54913
55095
|
},
|
|
54914
|
-
progressText ?
|
|
55096
|
+
progressText ? XEUtils114.toFormatString(`${XEUtils114.isFunction(progressText) ? progressText({}) : progressText}`, { percent: cacheItem.percent }) : getI18n29("vxe.upload.uploadProgress", [cacheItem.percent])
|
|
54915
55097
|
) : renderEmptyElement60($xeUpload),
|
|
54916
55098
|
!isLoading && (isError && showErrorStatus || isPending && showSubmitButton && !autoSubmit) ? h95(
|
|
54917
55099
|
"div",
|
|
@@ -55005,7 +55187,7 @@ var upload_default = defineVxeComponent({
|
|
|
55005
55187
|
defaultSlot ? getSlotVNs(defaultSlot({ isMoreView, options: fileList, $upload: $xeUpload })) : [
|
|
55006
55188
|
h95(button_default2, {
|
|
55007
55189
|
class: "vxe-upload--file-action-button",
|
|
55008
|
-
content: isMoreView || showButtonText ? buttonText ? `${
|
|
55190
|
+
content: isMoreView || showButtonText ? buttonText ? `${XEUtils114.isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n29("vxe.upload.fileBtnText") : "",
|
|
55009
55191
|
icon: showButtonIcon ? buttonIcon || getIcon37().UPLOAD_FILE_ADD : "",
|
|
55010
55192
|
disabled: isDisabled
|
|
55011
55193
|
})
|
|
@@ -55032,7 +55214,7 @@ var upload_default = defineVxeComponent({
|
|
|
55032
55214
|
let overMaxNum = 0;
|
|
55033
55215
|
let isMoreMax = false;
|
|
55034
55216
|
let isMiniMore = false;
|
|
55035
|
-
if (
|
|
55217
|
+
if (XEUtils114.isNumber(maxCount) && fileList.length > maxCount) {
|
|
55036
55218
|
isMoreMax = true;
|
|
55037
55219
|
isMiniMore = maxCount === 0;
|
|
55038
55220
|
overMaxNum = fileList.length - maxCount;
|
|
@@ -55082,7 +55264,7 @@ var upload_default = defineVxeComponent({
|
|
|
55082
55264
|
moreBtnSlot ? getSlotVNs(moreBtnSlot({ options: fileList })) : [
|
|
55083
55265
|
h95(button_default2, {
|
|
55084
55266
|
mode: "text",
|
|
55085
|
-
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]),
|
|
55086
55268
|
status: "primary",
|
|
55087
55269
|
onClick: handleMoreEvent
|
|
55088
55270
|
})
|
|
@@ -55176,7 +55358,7 @@ var upload_default = defineVxeComponent({
|
|
|
55176
55358
|
{
|
|
55177
55359
|
class: "vxe-upload--image-item-loading-text"
|
|
55178
55360
|
},
|
|
55179
|
-
progressText ?
|
|
55361
|
+
progressText ? XEUtils114.toFormatString(`${XEUtils114.isFunction(progressText) ? progressText({}) : progressText}`, { percent: cacheItem.percent }) : getI18n29("vxe.upload.uploadProgress", [cacheItem.percent])
|
|
55180
55362
|
) : renderEmptyElement60($xeUpload)
|
|
55181
55363
|
]
|
|
55182
55364
|
) : renderEmptyElement60($xeUpload),
|
|
@@ -55299,7 +55481,7 @@ var upload_default = defineVxeComponent({
|
|
|
55299
55481
|
{
|
|
55300
55482
|
class: "vxe-upload--image-action-content"
|
|
55301
55483
|
},
|
|
55302
|
-
buttonText ? `${
|
|
55484
|
+
buttonText ? `${XEUtils114.isFunction(buttonText) ? buttonText({}) : buttonText}` : getI18n29("vxe.upload.imgBtnText")
|
|
55303
55485
|
) : renderEmptyElement60($xeUpload),
|
|
55304
55486
|
showTipText && (defTipText || tipSlot) ? h95(
|
|
55305
55487
|
"div",
|
|
@@ -55325,7 +55507,7 @@ var upload_default = defineVxeComponent({
|
|
|
55325
55507
|
let overMaxNum = 0;
|
|
55326
55508
|
let isMoreMax = false;
|
|
55327
55509
|
let isMiniMore = false;
|
|
55328
|
-
if (
|
|
55510
|
+
if (XEUtils114.isNumber(maxCount) && fileList.length > maxCount) {
|
|
55329
55511
|
isMoreMax = true;
|
|
55330
55512
|
isMiniMore = maxCount === 0;
|
|
55331
55513
|
overMaxNum = fileList.length - maxCount;
|
|
@@ -55356,7 +55538,7 @@ var upload_default = defineVxeComponent({
|
|
|
55356
55538
|
moreBtnSlot ? getSlotVNs(moreBtnSlot({ options: fileList })) : [
|
|
55357
55539
|
h95(button_default2, {
|
|
55358
55540
|
mode: "text",
|
|
55359
|
-
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]),
|
|
55360
55542
|
status: "primary",
|
|
55361
55543
|
onClick: handleMoreEvent
|
|
55362
55544
|
})
|
|
@@ -55379,7 +55561,7 @@ var upload_default = defineVxeComponent({
|
|
|
55379
55561
|
moreBtnSlot ? getSlotVNs(moreBtnSlot({ options: fileList })) : [
|
|
55380
55562
|
h95(button_default2, {
|
|
55381
55563
|
mode: "text",
|
|
55382
|
-
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]),
|
|
55383
55565
|
status: "primary",
|
|
55384
55566
|
onClick: handleMoreEvent
|
|
55385
55567
|
})
|
|
@@ -55449,22 +55631,22 @@ var upload_default = defineVxeComponent({
|
|
|
55449
55631
|
);
|
|
55450
55632
|
};
|
|
55451
55633
|
const listFlag = ref81(0);
|
|
55452
|
-
|
|
55634
|
+
watch51(
|
|
55453
55635
|
() => props.modelValue ? props.modelValue.length : 0,
|
|
55454
55636
|
() => {
|
|
55455
55637
|
listFlag.value++;
|
|
55456
55638
|
}
|
|
55457
55639
|
);
|
|
55458
|
-
|
|
55640
|
+
watch51(
|
|
55459
55641
|
() => props.modelValue,
|
|
55460
55642
|
() => {
|
|
55461
55643
|
listFlag.value++;
|
|
55462
55644
|
}
|
|
55463
55645
|
);
|
|
55464
|
-
|
|
55646
|
+
watch51(listFlag, () => {
|
|
55465
55647
|
updateFileList();
|
|
55466
55648
|
});
|
|
55467
|
-
|
|
55649
|
+
onMounted55(() => {
|
|
55468
55650
|
if (props.multiple && props.singleMode) {
|
|
55469
55651
|
errLog23("vxe.error.errConflicts", ["multiple", "single-mode"]);
|
|
55470
55652
|
}
|
|
@@ -55478,13 +55660,13 @@ var upload_default = defineVxeComponent({
|
|
|
55478
55660
|
globalEvents27.on($xeUpload, "click", handleGlobalClickEvent);
|
|
55479
55661
|
globalEvents27.on($xeUpload, "blur", handleGlobalBlurEvent);
|
|
55480
55662
|
});
|
|
55481
|
-
|
|
55663
|
+
onBeforeUnmount25(() => {
|
|
55482
55664
|
reactData.isDragUploadStatus = false;
|
|
55483
55665
|
globalEvents27.off($xeUpload, "paste");
|
|
55484
55666
|
globalEvents27.off($xeUpload, "click");
|
|
55485
55667
|
globalEvents27.off($xeUpload, "blur");
|
|
55486
|
-
|
|
55487
|
-
|
|
55668
|
+
XEUtils114.assign(reactData, createReactData28());
|
|
55669
|
+
XEUtils114.assign(internalData, createInternalData27());
|
|
55488
55670
|
});
|
|
55489
55671
|
updateFileList();
|
|
55490
55672
|
$xeUpload.renderVN = renderVN;
|
|
@@ -55496,29 +55678,29 @@ var upload_default = defineVxeComponent({
|
|
|
55496
55678
|
});
|
|
55497
55679
|
|
|
55498
55680
|
// packages_temp/upload/index.ts
|
|
55499
|
-
import { VxeUI as
|
|
55681
|
+
import { VxeUI as VxeUI190 } from "@vxe-ui/core";
|
|
55500
55682
|
var VxeUpload = Object.assign({}, upload_default, {
|
|
55501
55683
|
install(app) {
|
|
55502
55684
|
app.component(upload_default.name, upload_default);
|
|
55503
55685
|
}
|
|
55504
55686
|
});
|
|
55505
55687
|
dynamicApp.use(VxeUpload);
|
|
55506
|
-
|
|
55507
|
-
|
|
55508
|
-
|
|
55688
|
+
VxeUI190.component(upload_default);
|
|
55689
|
+
VxeUI190.saveFile = saveLocalFile;
|
|
55690
|
+
VxeUI190.readFile = readLocalFile;
|
|
55509
55691
|
var Upload = VxeUpload;
|
|
55510
55692
|
var upload_default2 = VxeUpload;
|
|
55511
55693
|
|
|
55512
55694
|
// packages_temp/watermark/index.ts
|
|
55513
|
-
import { VxeUI as
|
|
55695
|
+
import { VxeUI as VxeUI192 } from "@vxe-ui/core";
|
|
55514
55696
|
|
|
55515
55697
|
// packages_temp/watermark/src/watermark.ts
|
|
55516
|
-
import { ref as ref82, h as h96, reactive as
|
|
55517
|
-
import
|
|
55518
|
-
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";
|
|
55519
55701
|
|
|
55520
55702
|
// packages_temp/watermark/src/util.ts
|
|
55521
|
-
import
|
|
55703
|
+
import XEUtils115 from "xe-utils";
|
|
55522
55704
|
var canvasEl = null;
|
|
55523
55705
|
var fontEl = null;
|
|
55524
55706
|
var fontCacheMaps = {};
|
|
@@ -55576,16 +55758,16 @@ function getFontConf(item, key, opts) {
|
|
|
55576
55758
|
}
|
|
55577
55759
|
function createMarkFont(contConf, defaultFontSize, opts) {
|
|
55578
55760
|
const { offset } = opts;
|
|
55579
|
-
const text =
|
|
55580
|
-
const fontSize =
|
|
55581
|
-
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] : [];
|
|
55582
55764
|
const { width, height } = calcFontWH(text, fontSize);
|
|
55583
55765
|
return {
|
|
55584
55766
|
text,
|
|
55585
55767
|
fontSize,
|
|
55586
55768
|
font: contConf.font,
|
|
55587
|
-
width: width +
|
|
55588
|
-
height: height +
|
|
55769
|
+
width: width + XEUtils115.toNumber(offsetX),
|
|
55770
|
+
height: height + XEUtils115.toNumber(offsetY)
|
|
55589
55771
|
};
|
|
55590
55772
|
}
|
|
55591
55773
|
function drayFont(ctx, item, opts) {
|
|
@@ -55596,8 +55778,8 @@ function drayFont(ctx, item, opts) {
|
|
|
55596
55778
|
function getContentUrl(content, defaultFontSize, options) {
|
|
55597
55779
|
const opts = Object.assign({}, options);
|
|
55598
55780
|
const { rotate } = opts;
|
|
55599
|
-
const deg =
|
|
55600
|
-
const contList = (
|
|
55781
|
+
const deg = XEUtils115.toNumber(rotate);
|
|
55782
|
+
const contList = (XEUtils115.isArray(content) ? content : [content]).map((item) => {
|
|
55601
55783
|
if (item) {
|
|
55602
55784
|
if (item.textContent) {
|
|
55603
55785
|
return createMarkFont(item, defaultFontSize, opts);
|
|
@@ -55627,9 +55809,9 @@ function getContentUrl(content, defaultFontSize, options) {
|
|
|
55627
55809
|
const ctx = canvasEl2.getContext("2d");
|
|
55628
55810
|
if (ctx && contList.length) {
|
|
55629
55811
|
const { gap } = opts;
|
|
55630
|
-
const gapList = gap ?
|
|
55631
|
-
const gapX =
|
|
55632
|
-
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]);
|
|
55633
55815
|
const { contentWidth } = calcContentWH(contList);
|
|
55634
55816
|
const canvasWidth = contentWidth * 2 + gapX * 2 + gapX / 2;
|
|
55635
55817
|
const canvasHeight = contentWidth * 2 + gapY;
|
|
@@ -55670,7 +55852,7 @@ function getContentUrl(content, defaultFontSize, options) {
|
|
|
55670
55852
|
}
|
|
55671
55853
|
|
|
55672
55854
|
// packages_temp/watermark/src/watermark.ts
|
|
55673
|
-
var { getConfig: getConfig75, createEvent:
|
|
55855
|
+
var { getConfig: getConfig75, createEvent: createEvent84, globalEvents: globalEvents28 } = VxeUI191;
|
|
55674
55856
|
var watermark_default = defineVxeComponent({
|
|
55675
55857
|
name: "VxeWatermark",
|
|
55676
55858
|
props: {
|
|
@@ -55683,7 +55865,7 @@ var watermark_default = defineVxeComponent({
|
|
|
55683
55865
|
},
|
|
55684
55866
|
gap: {
|
|
55685
55867
|
type: [Array, Number, String],
|
|
55686
|
-
default: () =>
|
|
55868
|
+
default: () => XEUtils116.clone(getConfig75().watermark.gap, true)
|
|
55687
55869
|
},
|
|
55688
55870
|
content: [String, Array],
|
|
55689
55871
|
font: Object,
|
|
@@ -55693,18 +55875,18 @@ var watermark_default = defineVxeComponent({
|
|
|
55693
55875
|
emits: [],
|
|
55694
55876
|
setup(props, context) {
|
|
55695
55877
|
const { emit } = context;
|
|
55696
|
-
const xID =
|
|
55878
|
+
const xID = XEUtils116.uniqueId();
|
|
55697
55879
|
const refElem = ref82();
|
|
55698
|
-
const reactData =
|
|
55880
|
+
const reactData = reactive88({
|
|
55699
55881
|
markUrl: ""
|
|
55700
55882
|
});
|
|
55701
55883
|
const refMaps = {
|
|
55702
55884
|
refElem
|
|
55703
55885
|
};
|
|
55704
|
-
const computeFontOpts =
|
|
55705
|
-
return
|
|
55886
|
+
const computeFontOpts = computed64(() => {
|
|
55887
|
+
return XEUtils116.assign({}, XEUtils116.clone(getConfig75().watermark.font, true), props.font);
|
|
55706
55888
|
});
|
|
55707
|
-
const computeWrapperStyle =
|
|
55889
|
+
const computeWrapperStyle = computed64(() => {
|
|
55708
55890
|
const { width, height, zIndex: zIndex2 } = props;
|
|
55709
55891
|
const { markUrl } = reactData;
|
|
55710
55892
|
const stys = {};
|
|
@@ -55732,7 +55914,7 @@ var watermark_default = defineVxeComponent({
|
|
|
55732
55914
|
getComputeMaps: () => computeMaps
|
|
55733
55915
|
};
|
|
55734
55916
|
const dispatchEvent = (type, params, evnt) => {
|
|
55735
|
-
emit(type,
|
|
55917
|
+
emit(type, createEvent84(evnt, { $watermark: $xeWatermark }, params));
|
|
55736
55918
|
};
|
|
55737
55919
|
const watermarkMethods = {
|
|
55738
55920
|
dispatchEvent
|
|
@@ -55764,54 +55946,54 @@ var watermark_default = defineVxeComponent({
|
|
|
55764
55946
|
style: wrapperStyle
|
|
55765
55947
|
});
|
|
55766
55948
|
};
|
|
55767
|
-
|
|
55949
|
+
watch52(
|
|
55768
55950
|
() => props.imageUrl,
|
|
55769
55951
|
() => {
|
|
55770
55952
|
updateMarkStyle();
|
|
55771
55953
|
}
|
|
55772
55954
|
);
|
|
55773
|
-
|
|
55955
|
+
watch52(
|
|
55774
55956
|
() => props.content,
|
|
55775
55957
|
() => {
|
|
55776
55958
|
updateMarkStyle();
|
|
55777
55959
|
}
|
|
55778
55960
|
);
|
|
55779
|
-
|
|
55961
|
+
watch52(
|
|
55780
55962
|
() => props.gap,
|
|
55781
55963
|
() => {
|
|
55782
55964
|
updateMarkStyle();
|
|
55783
55965
|
}
|
|
55784
55966
|
);
|
|
55785
|
-
|
|
55967
|
+
watch52(
|
|
55786
55968
|
() => props.rotate,
|
|
55787
55969
|
() => {
|
|
55788
55970
|
updateMarkStyle();
|
|
55789
55971
|
}
|
|
55790
55972
|
);
|
|
55791
|
-
|
|
55973
|
+
watch52(
|
|
55792
55974
|
() => props.width,
|
|
55793
55975
|
() => {
|
|
55794
55976
|
updateMarkStyle();
|
|
55795
55977
|
}
|
|
55796
55978
|
);
|
|
55797
|
-
|
|
55979
|
+
watch52(
|
|
55798
55980
|
() => props.height,
|
|
55799
55981
|
() => {
|
|
55800
55982
|
updateMarkStyle();
|
|
55801
55983
|
}
|
|
55802
55984
|
);
|
|
55803
|
-
|
|
55985
|
+
watch52(
|
|
55804
55986
|
() => props.font,
|
|
55805
55987
|
() => {
|
|
55806
55988
|
updateMarkStyle();
|
|
55807
55989
|
}
|
|
55808
55990
|
);
|
|
55809
|
-
|
|
55991
|
+
onMounted56(() => {
|
|
55810
55992
|
updateMarkStyle();
|
|
55811
55993
|
globalEvents28.on(
|
|
55812
55994
|
$xeWatermark,
|
|
55813
55995
|
"resize",
|
|
55814
|
-
|
|
55996
|
+
XEUtils116.throttle(
|
|
55815
55997
|
() => {
|
|
55816
55998
|
updateMarkStyle();
|
|
55817
55999
|
},
|
|
@@ -55820,7 +56002,7 @@ var watermark_default = defineVxeComponent({
|
|
|
55820
56002
|
)
|
|
55821
56003
|
);
|
|
55822
56004
|
});
|
|
55823
|
-
|
|
56005
|
+
onUnmounted32(() => {
|
|
55824
56006
|
globalEvents28.off($xeWatermark, "resize");
|
|
55825
56007
|
});
|
|
55826
56008
|
$xeWatermark.renderVN = renderVN;
|
|
@@ -55838,7 +56020,7 @@ var VxeWatermark = Object.assign({}, watermark_default, {
|
|
|
55838
56020
|
}
|
|
55839
56021
|
});
|
|
55840
56022
|
dynamicApp.use(VxeWatermark);
|
|
55841
|
-
|
|
56023
|
+
VxeUI192.component(watermark_default);
|
|
55842
56024
|
var WatermarkController = {
|
|
55843
56025
|
load(options) {
|
|
55844
56026
|
checkDynamic();
|
|
@@ -55852,14 +56034,14 @@ var WatermarkController = {
|
|
|
55852
56034
|
return Promise.resolve();
|
|
55853
56035
|
}
|
|
55854
56036
|
};
|
|
55855
|
-
|
|
56037
|
+
VxeUI192.watermark = WatermarkController;
|
|
55856
56038
|
var Watermark = VxeWatermark;
|
|
55857
56039
|
var watermark_default2 = VxeWatermark;
|
|
55858
56040
|
|
|
55859
56041
|
// packages_temp/components.ts
|
|
55860
56042
|
__reExport(components_exports, core_star);
|
|
55861
56043
|
import * as core_star from "@vxe-ui/core";
|
|
55862
|
-
var { setI18n, setLanguage, setTheme, setConfig: setConfig2 } =
|
|
56044
|
+
var { setI18n, setLanguage, setTheme, setConfig: setConfig2 } = VxeUI193;
|
|
55863
56045
|
var components = [
|
|
55864
56046
|
alert_default2,
|
|
55865
56047
|
anchor_default2,
|
|
@@ -56177,7 +56359,7 @@ export {
|
|
|
56177
56359
|
VxeTransfer,
|
|
56178
56360
|
VxeTree,
|
|
56179
56361
|
VxeTreeSelect,
|
|
56180
|
-
|
|
56362
|
+
VxeUI193 as VxeUI,
|
|
56181
56363
|
VxeUpload,
|
|
56182
56364
|
VxeWatermark,
|
|
56183
56365
|
Watermark,
|