vxe-pc-ui 4.14.38 → 4.14.40
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 +1751 -730
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/cascader/src/cascader.js +1157 -172
- package/es/cascader/src/util.js +7 -0
- package/es/cascader/style.css +197 -21
- package/es/cascader/style.min.css +1 -1
- package/es/input/src/input.js +2 -2
- package/es/language/ar-EG.js +7 -0
- package/es/language/de-DE.js +7 -0
- package/es/language/en-US.js +7 -0
- package/es/language/es-ES.js +7 -0
- package/es/language/fr-FR.js +7 -0
- package/es/language/hu-HU.js +7 -0
- package/es/language/hy-AM.js +7 -0
- package/es/language/id-ID.js +7 -0
- package/es/language/it-IT.js +7 -0
- package/es/language/ja-JP.js +7 -0
- package/es/language/ko-KR.js +7 -0
- package/es/language/ms-MY.js +7 -0
- package/es/language/nb-NO.js +7 -0
- package/es/language/pt-BR.js +7 -0
- package/es/language/ru-RU.js +7 -0
- package/es/language/th-TH.js +7 -0
- package/es/language/ug-CN.js +7 -0
- package/es/language/uk-UA.js +7 -0
- package/es/language/uz-UZ.js +7 -0
- package/es/language/vi-VN.js +7 -0
- package/es/language/zh-CHT.js +7 -0
- package/es/language/zh-CN.js +7 -0
- package/es/list/style.css +2 -1
- package/es/list/style.min.css +1 -1
- package/es/number-input/src/number-input.js +25 -10
- package/es/number-input/src/util.js +16 -4
- package/es/split/style.css +1 -1
- package/es/split/style.min.css +1 -1
- package/es/splitter/style.css +1 -1
- package/es/splitter/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tree/src/tree.js +23 -21
- package/es/tree-select/src/tree-select.js +20 -16
- package/es/tree-select/style.css +1 -8
- package/es/tree-select/style.min.css +1 -1
- package/es/ui/index.js +10 -4
- package/es/ui/src/dom.js +2 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-cascader/style.css +197 -21
- package/es/vxe-cascader/style.min.css +1 -1
- package/es/vxe-list/style.css +2 -1
- package/es/vxe-list/style.min.css +1 -1
- package/es/vxe-split/style.css +1 -1
- package/es/vxe-split/style.min.css +1 -1
- package/es/vxe-splitter/style.css +1 -1
- package/es/vxe-splitter/style.min.css +1 -1
- package/es/vxe-tree-select/style.css +1 -8
- package/es/vxe-tree-select/style.min.css +1 -1
- package/lib/cascader/src/cascader.js +1322 -173
- package/lib/cascader/src/cascader.min.js +1 -1
- package/lib/cascader/src/util.js +15 -0
- package/lib/cascader/src/util.min.js +1 -0
- package/lib/cascader/style/style.css +197 -21
- package/lib/cascader/style/style.min.css +1 -1
- package/lib/index.umd.js +2189 -974
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +2 -2
- package/lib/input/src/input.min.js +1 -1
- package/lib/language/ar-EG.js +7 -0
- package/lib/language/ar-EG.min.js +1 -1
- package/lib/language/ar-EG.umd.js +7 -0
- package/lib/language/de-DE.js +7 -0
- package/lib/language/de-DE.min.js +1 -1
- package/lib/language/de-DE.umd.js +7 -0
- package/lib/language/en-US.js +7 -0
- package/lib/language/en-US.min.js +1 -1
- package/lib/language/en-US.umd.js +7 -0
- package/lib/language/es-ES.js +7 -0
- package/lib/language/es-ES.min.js +1 -1
- package/lib/language/es-ES.umd.js +7 -0
- package/lib/language/fr-FR.js +7 -0
- package/lib/language/fr-FR.min.js +1 -1
- package/lib/language/fr-FR.umd.js +7 -0
- package/lib/language/hu-HU.js +7 -0
- package/lib/language/hu-HU.min.js +1 -1
- package/lib/language/hu-HU.umd.js +7 -0
- package/lib/language/hy-AM.js +7 -0
- package/lib/language/hy-AM.min.js +1 -1
- package/lib/language/hy-AM.umd.js +7 -0
- package/lib/language/id-ID.js +7 -0
- package/lib/language/id-ID.min.js +1 -1
- package/lib/language/id-ID.umd.js +7 -0
- package/lib/language/it-IT.js +7 -0
- package/lib/language/it-IT.min.js +1 -1
- package/lib/language/it-IT.umd.js +7 -0
- package/lib/language/ja-JP.js +7 -0
- package/lib/language/ja-JP.min.js +1 -1
- package/lib/language/ja-JP.umd.js +7 -0
- package/lib/language/ko-KR.js +7 -0
- package/lib/language/ko-KR.min.js +1 -1
- package/lib/language/ko-KR.umd.js +7 -0
- package/lib/language/ms-MY.js +7 -0
- package/lib/language/ms-MY.min.js +1 -1
- package/lib/language/ms-MY.umd.js +7 -0
- package/lib/language/nb-NO.js +7 -0
- package/lib/language/nb-NO.min.js +1 -1
- package/lib/language/nb-NO.umd.js +7 -0
- package/lib/language/pt-BR.js +7 -0
- package/lib/language/pt-BR.min.js +1 -1
- package/lib/language/pt-BR.umd.js +7 -0
- package/lib/language/ru-RU.js +7 -0
- package/lib/language/ru-RU.min.js +1 -1
- package/lib/language/ru-RU.umd.js +7 -0
- package/lib/language/th-TH.js +7 -0
- package/lib/language/th-TH.min.js +1 -1
- package/lib/language/th-TH.umd.js +7 -0
- package/lib/language/ug-CN.js +7 -0
- package/lib/language/ug-CN.min.js +1 -1
- package/lib/language/ug-CN.umd.js +7 -0
- package/lib/language/uk-UA.js +7 -0
- package/lib/language/uk-UA.min.js +1 -1
- package/lib/language/uk-UA.umd.js +7 -0
- package/lib/language/uz-UZ.js +7 -0
- package/lib/language/uz-UZ.min.js +1 -1
- package/lib/language/uz-UZ.umd.js +7 -0
- package/lib/language/vi-VN.js +7 -0
- package/lib/language/vi-VN.min.js +1 -1
- package/lib/language/vi-VN.umd.js +7 -0
- package/lib/language/zh-CHT.js +7 -0
- package/lib/language/zh-CHT.min.js +1 -1
- package/lib/language/zh-CHT.umd.js +7 -0
- package/lib/language/zh-CN.js +7 -0
- package/lib/language/zh-CN.min.js +1 -1
- package/lib/language/zh-CN.umd.js +7 -0
- package/lib/list/style/style.css +2 -1
- package/lib/list/style/style.min.css +1 -1
- package/lib/number-input/src/number-input.js +27 -7
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/number-input/src/util.js +15 -4
- package/lib/number-input/src/util.min.js +1 -1
- package/lib/split/style/style.css +1 -1
- package/lib/split/style/style.min.css +1 -1
- package/lib/splitter/style/style.css +1 -1
- package/lib/splitter/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tree/src/tree.js +23 -21
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +22 -17
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/tree-select/style/style.css +1 -8
- package/lib/tree-select/style/style.min.css +1 -1
- package/lib/ui/index.js +10 -4
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +5 -3
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-cascader/style/style.css +197 -21
- package/lib/vxe-cascader/style/style.min.css +1 -1
- package/lib/vxe-list/style/style.css +2 -1
- package/lib/vxe-list/style/style.min.css +1 -1
- package/lib/vxe-split/style/style.css +1 -1
- package/lib/vxe-split/style/style.min.css +1 -1
- package/lib/vxe-splitter/style/style.css +1 -1
- package/lib/vxe-splitter/style/style.min.css +1 -1
- package/lib/vxe-tree-select/style/style.css +1 -8
- package/lib/vxe-tree-select/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/cascader/src/cascader.ts +1193 -182
- package/packages/cascader/src/util.ts +9 -0
- package/packages/input/src/input.ts +2 -2
- package/packages/language/ar-EG.ts +7 -0
- package/packages/language/de-DE.ts +7 -0
- package/packages/language/en-US.ts +7 -0
- package/packages/language/es-ES.ts +7 -0
- package/packages/language/fr-FR.ts +7 -0
- package/packages/language/hu-HU.ts +7 -0
- package/packages/language/hy-AM.ts +7 -0
- package/packages/language/id-ID.ts +7 -0
- package/packages/language/it-IT.ts +7 -0
- package/packages/language/ja-JP.ts +7 -0
- package/packages/language/ko-KR.ts +7 -0
- package/packages/language/ms-MY.ts +7 -0
- package/packages/language/nb-NO.ts +7 -0
- package/packages/language/pt-BR.ts +7 -0
- package/packages/language/ru-RU.ts +7 -0
- package/packages/language/th-TH.ts +7 -0
- package/packages/language/ug-CN.ts +7 -0
- package/packages/language/uk-UA.ts +7 -0
- package/packages/language/uz-UZ.ts +7 -0
- package/packages/language/vi-VN.ts +7 -0
- package/packages/language/zh-CHT.ts +7 -0
- package/packages/language/zh-CN.ts +7 -0
- package/packages/number-input/src/number-input.ts +24 -11
- package/packages/number-input/src/util.ts +17 -4
- package/packages/tree/src/tree.ts +23 -22
- package/packages/tree-select/src/tree-select.ts +21 -16
- package/packages/ui/index.ts +10 -3
- package/packages/ui/src/dom.ts +3 -2
- package/styles/components/cascader.scss +116 -21
- package/styles/components/list.scss +2 -1
- package/styles/components/splitter.scss +3 -1
- package/styles/components/tree-select.scss +1 -8
- package/styles/helpers/placement.scss +2 -2
- package/styles/theme/base.scss +7 -0
- package/styles/theme/dark.scss +9 -0
- package/styles/theme/light.scss +9 -0
- package/styles/variable.scss +8 -0
- package/types/components/cascader.d.ts +167 -57
- package/types/components/number-input.d.ts +12 -1
- package/types/ui/global-icon.d.ts +5 -0
- /package/es/icon/{iconfont.1781439392102.ttf → iconfont.1781658330183.ttf} +0 -0
- /package/es/icon/{iconfont.1781439392102.woff → iconfont.1781658330183.woff} +0 -0
- /package/es/icon/{iconfont.1781439392102.woff2 → iconfont.1781658330183.woff2} +0 -0
- /package/es/{iconfont.1781439392102.ttf → iconfont.1781658330183.ttf} +0 -0
- /package/es/{iconfont.1781439392102.woff → iconfont.1781658330183.woff} +0 -0
- /package/es/{iconfont.1781439392102.woff2 → iconfont.1781658330183.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781439392102.ttf → iconfont.1781658330183.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781439392102.woff → iconfont.1781658330183.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781439392102.woff2 → iconfont.1781658330183.woff2} +0 -0
- /package/lib/{iconfont.1781439392102.ttf → iconfont.1781658330183.ttf} +0 -0
- /package/lib/{iconfont.1781439392102.woff → iconfont.1781658330183.woff} +0 -0
- /package/lib/{iconfont.1781439392102.woff2 → iconfont.1781658330183.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as core from '@vxe-ui/core';
|
|
2
|
-
import { VxeUI, log, setConfig as setConfig$1, setIcon, getConfig as getConfig$3, createEvent, getIcon as getIcon$2, renderEmptyElement, useSize, usePermission, permission, globalEvents, renderer, getI18n as getI18n$2, GLOBAL_EVENT_KEYS, commands, formats, getComponent, validators
|
|
2
|
+
import { VxeUI, log, setConfig as setConfig$1, setIcon, getConfig as getConfig$3, createEvent, getIcon as getIcon$2, renderEmptyElement, useSize, usePermission, permission, globalEvents, renderer, getI18n as getI18n$2, globalResize, GLOBAL_EVENT_KEYS, getSlotVNs as getSlotVNs$1, commands, formats, getComponent, validators } from '@vxe-ui/core';
|
|
3
3
|
export * from '@vxe-ui/core';
|
|
4
|
-
import { defineComponent, reactive, h, createCommentVNode, createApp, ref, inject, computed, watch, onMounted, onUnmounted, provide, nextTick, onBeforeUnmount, resolveComponent, Teleport,
|
|
4
|
+
import { defineComponent, reactive, h, createCommentVNode, createApp, ref, inject, computed, watch, onMounted, onUnmounted, provide, nextTick, onBeforeUnmount, resolveComponent, Teleport, onActivated, onDeactivated, TransitionGroup } from 'vue';
|
|
5
5
|
import XEUtils from 'xe-utils';
|
|
6
6
|
import DomZIndex from 'dom-zindex';
|
|
7
7
|
|
|
@@ -80,11 +80,11 @@ function checkDynamic() {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const version$1 = `ui v${"4.14.
|
|
83
|
+
const version$1 = `ui v${"4.14.40"}`;
|
|
84
84
|
const warnLog = log.create('warn', version$1);
|
|
85
85
|
const errLog = log.create('error', version$1);
|
|
86
86
|
|
|
87
|
-
const version = "4.14.
|
|
87
|
+
const version = "4.14.40";
|
|
88
88
|
VxeUI.uiVersion = version;
|
|
89
89
|
VxeUI.dynamicApp = dynamicApp;
|
|
90
90
|
function config(options) {
|
|
@@ -144,7 +144,10 @@ setConfig$1({
|
|
|
144
144
|
},
|
|
145
145
|
carouselItem: {},
|
|
146
146
|
cascader: {
|
|
147
|
-
|
|
147
|
+
showFullLabel: true,
|
|
148
|
+
treeConfig: {
|
|
149
|
+
showIcon: true
|
|
150
|
+
}
|
|
148
151
|
},
|
|
149
152
|
checkbox: {},
|
|
150
153
|
checkboxButton: {},
|
|
@@ -498,7 +501,6 @@ setConfig$1({
|
|
|
498
501
|
}
|
|
499
502
|
},
|
|
500
503
|
treeSelect: {
|
|
501
|
-
autoClose: null,
|
|
502
504
|
// separator: '/',
|
|
503
505
|
virtualYConfig: {
|
|
504
506
|
enabled: true,
|
|
@@ -736,7 +738,11 @@ setIcon({
|
|
|
736
738
|
BACKTOP_TOP: iconPrefix + 'top',
|
|
737
739
|
// context-menu
|
|
738
740
|
CONTEXT_MENU_OPTION_LOADING: iconPrefix + 'spinner roll',
|
|
739
|
-
CONTEXT_MENU_CHILDREN: iconPrefix + 'arrow-right'
|
|
741
|
+
CONTEXT_MENU_CHILDREN: iconPrefix + 'arrow-right',
|
|
742
|
+
// cascader
|
|
743
|
+
CASCADER_NODE_OPEN: iconPrefix + 'arrow-right',
|
|
744
|
+
CASCADER_NODE_CLOSE: iconPrefix + 'arrow-right',
|
|
745
|
+
CASCADER_NODE_LOADED: iconPrefix + 'spinner roll'
|
|
740
746
|
});
|
|
741
747
|
|
|
742
748
|
var zhCN = {
|
|
@@ -1092,6 +1098,13 @@ var zhCN = {
|
|
|
1092
1098
|
yearLabel: '{0} 年',
|
|
1093
1099
|
monthLabel: '{0} 月'
|
|
1094
1100
|
},
|
|
1101
|
+
cascader: {
|
|
1102
|
+
clearChecked: '清除',
|
|
1103
|
+
allChecked: '全选',
|
|
1104
|
+
total: '已选 {0} 项',
|
|
1105
|
+
close: '关闭',
|
|
1106
|
+
search: '搜索'
|
|
1107
|
+
},
|
|
1095
1108
|
numberInput: {
|
|
1096
1109
|
currencySymbol: '¥'
|
|
1097
1110
|
},
|
|
@@ -1855,7 +1868,7 @@ function scrollToView(elem) {
|
|
|
1855
1868
|
}
|
|
1856
1869
|
}
|
|
1857
1870
|
function updatePanelPlacement(targetElem, panelElem, options) {
|
|
1858
|
-
const { placement, defaultPlacement, teleportTo, marginSize } = Object.assign({ teleportTo: false, marginSize: 18 }, options);
|
|
1871
|
+
const { placement, defaultPlacement, teleportTo, marginSize, isMinWidth } = Object.assign({ teleportTo: false, marginSize: 18, isMinWidth: true }, options);
|
|
1859
1872
|
let panelPlacement = 'bottom';
|
|
1860
1873
|
let top = '';
|
|
1861
1874
|
let bottom = '';
|
|
@@ -1952,7 +1965,7 @@ function updatePanelPlacement(targetElem, panelElem, options) {
|
|
|
1952
1965
|
if (XEUtils.isNumber(right)) {
|
|
1953
1966
|
stys.right = toCssUnit(right);
|
|
1954
1967
|
}
|
|
1955
|
-
if (XEUtils.isNumber(minWidth)) {
|
|
1968
|
+
if (isMinWidth && XEUtils.isNumber(minWidth)) {
|
|
1956
1969
|
stys.minWidth = toCssUnit(minWidth);
|
|
1957
1970
|
}
|
|
1958
1971
|
}
|
|
@@ -3778,7 +3791,7 @@ function createInternalData$d() {
|
|
|
3778
3791
|
targetEl: null
|
|
3779
3792
|
};
|
|
3780
3793
|
}
|
|
3781
|
-
function createReactData$
|
|
3794
|
+
function createReactData$a() {
|
|
3782
3795
|
return {
|
|
3783
3796
|
showBtn: false,
|
|
3784
3797
|
backtopZindex: 0
|
|
@@ -3858,7 +3871,7 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
3858
3871
|
const refElem = ref();
|
|
3859
3872
|
const { computeSize } = useSize(props);
|
|
3860
3873
|
const internalData = createInternalData$d();
|
|
3861
|
-
const reactData = reactive(createReactData$
|
|
3874
|
+
const reactData = reactive(createReactData$a());
|
|
3862
3875
|
const refMaps = {
|
|
3863
3876
|
refElem
|
|
3864
3877
|
};
|
|
@@ -4035,7 +4048,7 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
4035
4048
|
});
|
|
4036
4049
|
onBeforeUnmount(() => {
|
|
4037
4050
|
removeScrollEvent();
|
|
4038
|
-
XEUtils.assign(reactData, createReactData$
|
|
4051
|
+
XEUtils.assign(reactData, createReactData$a());
|
|
4039
4052
|
XEUtils.assign(internalData, createInternalData$d());
|
|
4040
4053
|
});
|
|
4041
4054
|
$xeBacktop.renderVN = renderVN;
|
|
@@ -6660,53 +6673,431 @@ dynamicApp.use(VxeCarouselItem);
|
|
|
6660
6673
|
VxeUI.component(VxeCarouselItemComponent);
|
|
6661
6674
|
const CarouselItem = VxeCarouselItem;
|
|
6662
6675
|
|
|
6663
|
-
function enNodeValue(nodeid) {
|
|
6676
|
+
function enNodeValue$1(nodeid) {
|
|
6664
6677
|
return XEUtils.eqNull(nodeid) ? '' : encodeURIComponent(`${nodeid}`);
|
|
6665
6678
|
}
|
|
6666
|
-
function deNodeValue(nodeid) {
|
|
6679
|
+
function deNodeValue$1(nodeid) {
|
|
6667
6680
|
return nodeid ? decodeURIComponent(`${nodeid}`) : nodeid;
|
|
6668
6681
|
}
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6682
|
+
|
|
6683
|
+
function createReactData$9() {
|
|
6684
|
+
return {
|
|
6685
|
+
scrollYLoad: false,
|
|
6686
|
+
bodyHeight: 0,
|
|
6687
|
+
customHeight: 0,
|
|
6688
|
+
customMaxHeight: 0,
|
|
6689
|
+
parentHeight: 0,
|
|
6690
|
+
topSpaceHeight: 0,
|
|
6691
|
+
items: []
|
|
6692
|
+
};
|
|
6693
|
+
}
|
|
6694
|
+
function createInternalData$c() {
|
|
6695
|
+
return {
|
|
6696
|
+
resizeObserver: undefined,
|
|
6697
|
+
fullData: [],
|
|
6698
|
+
lastScrollLeft: 0,
|
|
6699
|
+
lastScrollTop: 0,
|
|
6700
|
+
scrollYStore: {
|
|
6701
|
+
startIndex: 0,
|
|
6702
|
+
endIndex: 0,
|
|
6703
|
+
visibleSize: 0,
|
|
6704
|
+
offsetSize: 0,
|
|
6705
|
+
rowHeight: 0
|
|
6687
6706
|
}
|
|
6688
|
-
}
|
|
6689
|
-
return count;
|
|
6707
|
+
};
|
|
6690
6708
|
}
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6709
|
+
var VxeListComponent = defineVxeComponent({
|
|
6710
|
+
name: 'VxeList',
|
|
6711
|
+
props: {
|
|
6712
|
+
data: Array,
|
|
6713
|
+
height: [Number, String],
|
|
6714
|
+
maxHeight: [Number, String],
|
|
6715
|
+
loading: Boolean,
|
|
6716
|
+
className: [String, Function],
|
|
6717
|
+
size: {
|
|
6718
|
+
type: String,
|
|
6719
|
+
default: () => getConfig$3().list.size || getConfig$3().size
|
|
6720
|
+
},
|
|
6721
|
+
autoResize: {
|
|
6722
|
+
type: Boolean,
|
|
6723
|
+
default: () => getConfig$3().list.autoResize
|
|
6724
|
+
},
|
|
6725
|
+
syncResize: [Boolean, String, Number],
|
|
6726
|
+
virtualYConfig: Object,
|
|
6727
|
+
scrollY: Object
|
|
6728
|
+
},
|
|
6729
|
+
emits: [
|
|
6730
|
+
'scroll'
|
|
6731
|
+
],
|
|
6732
|
+
setup(props, context) {
|
|
6733
|
+
const { slots, emit } = context;
|
|
6734
|
+
const xID = XEUtils.uniqueId();
|
|
6735
|
+
const browseObj = XEUtils.browse();
|
|
6736
|
+
const { computeSize } = useSize(props);
|
|
6737
|
+
const reactData = reactive(createReactData$9());
|
|
6738
|
+
const internalData = createInternalData$c();
|
|
6739
|
+
const refElem = ref();
|
|
6740
|
+
const refVirtualWrapper = ref();
|
|
6741
|
+
const refVirtualBody = ref();
|
|
6742
|
+
const refMaps = {
|
|
6743
|
+
refElem
|
|
6744
|
+
};
|
|
6745
|
+
const $xeList = {
|
|
6746
|
+
xID,
|
|
6747
|
+
props,
|
|
6748
|
+
context,
|
|
6749
|
+
reactData,
|
|
6750
|
+
internalData,
|
|
6751
|
+
getRefMaps: () => refMaps
|
|
6752
|
+
};
|
|
6753
|
+
const computeSYOpts = computed(() => {
|
|
6754
|
+
return Object.assign({}, getConfig$3().list.virtualYConfig || getConfig$3().list.scrollY, props.virtualYConfig || props.scrollY);
|
|
6755
|
+
});
|
|
6756
|
+
const computeStyles = computed(() => {
|
|
6757
|
+
const { height, maxHeight } = props;
|
|
6758
|
+
const { customHeight, customMaxHeight } = reactData;
|
|
6759
|
+
const style = {};
|
|
6760
|
+
if (height) {
|
|
6761
|
+
style.height = `${customHeight}px`;
|
|
6762
|
+
}
|
|
6763
|
+
else if (maxHeight) {
|
|
6764
|
+
style.height = 'auto';
|
|
6765
|
+
style.maxHeight = `${customMaxHeight}px`;
|
|
6766
|
+
}
|
|
6767
|
+
return style;
|
|
6768
|
+
});
|
|
6769
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
6770
|
+
emit(type, createEvent(evnt, { $list: $xeList }, params));
|
|
6771
|
+
};
|
|
6772
|
+
const calcTableHeight = (key) => {
|
|
6773
|
+
const { parentHeight } = reactData;
|
|
6774
|
+
const val = props[key];
|
|
6775
|
+
let num = 0;
|
|
6776
|
+
if (val) {
|
|
6777
|
+
if (val === '100%' || val === 'auto') {
|
|
6778
|
+
num = parentHeight;
|
|
6779
|
+
}
|
|
6780
|
+
else {
|
|
6781
|
+
if (isScale(val)) {
|
|
6782
|
+
num = Math.floor((XEUtils.toInteger(val) || 1) / 100 * parentHeight);
|
|
6783
|
+
}
|
|
6784
|
+
else {
|
|
6785
|
+
num = XEUtils.toNumber(val);
|
|
6786
|
+
}
|
|
6787
|
+
num = Math.max(40, num);
|
|
6788
|
+
}
|
|
6789
|
+
}
|
|
6790
|
+
return num;
|
|
6791
|
+
};
|
|
6792
|
+
const updateHeight = () => {
|
|
6793
|
+
reactData.customHeight = calcTableHeight('height');
|
|
6794
|
+
reactData.customMaxHeight = calcTableHeight('maxHeight');
|
|
6795
|
+
};
|
|
6796
|
+
const updateYSpace = () => {
|
|
6797
|
+
const { scrollYLoad } = reactData;
|
|
6798
|
+
const { scrollYStore, fullData } = internalData;
|
|
6799
|
+
reactData.bodyHeight = scrollYLoad ? fullData.length * scrollYStore.rowHeight : 0;
|
|
6800
|
+
reactData.topSpaceHeight = scrollYLoad ? Math.max(scrollYStore.startIndex * scrollYStore.rowHeight, 0) : 0;
|
|
6801
|
+
};
|
|
6802
|
+
const handleData = () => {
|
|
6803
|
+
const { scrollYLoad } = reactData;
|
|
6804
|
+
const { fullData, scrollYStore } = internalData;
|
|
6805
|
+
reactData.items = scrollYLoad ? fullData.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullData.slice(0);
|
|
6806
|
+
return nextTick();
|
|
6807
|
+
};
|
|
6808
|
+
const updateYData = () => {
|
|
6809
|
+
handleData();
|
|
6810
|
+
updateYSpace();
|
|
6811
|
+
};
|
|
6812
|
+
const computeScrollLoad = () => {
|
|
6813
|
+
return nextTick().then(() => {
|
|
6814
|
+
const { scrollYLoad } = reactData;
|
|
6815
|
+
const { scrollYStore } = internalData;
|
|
6816
|
+
const virtualBodyElem = refVirtualBody.value;
|
|
6817
|
+
const sYOpts = computeSYOpts.value;
|
|
6818
|
+
let rowHeight = 0;
|
|
6819
|
+
let firstItemElem;
|
|
6820
|
+
if (virtualBodyElem) {
|
|
6821
|
+
if (sYOpts.sItem) {
|
|
6822
|
+
firstItemElem = virtualBodyElem.querySelector(sYOpts.sItem);
|
|
6823
|
+
}
|
|
6824
|
+
if (!firstItemElem) {
|
|
6825
|
+
firstItemElem = virtualBodyElem.children[0];
|
|
6826
|
+
}
|
|
6827
|
+
}
|
|
6828
|
+
if (firstItemElem) {
|
|
6829
|
+
rowHeight = firstItemElem.offsetHeight;
|
|
6830
|
+
}
|
|
6831
|
+
rowHeight = Math.max(12, rowHeight);
|
|
6832
|
+
scrollYStore.rowHeight = rowHeight;
|
|
6833
|
+
// 计算 Y 逻辑
|
|
6834
|
+
if (scrollYLoad) {
|
|
6835
|
+
const scrollBodyElem = refVirtualWrapper.value;
|
|
6836
|
+
const visibleYSize = Math.max(8, Math.ceil(scrollBodyElem.clientHeight / rowHeight));
|
|
6837
|
+
const offsetYSize = sYOpts.oSize ? XEUtils.toNumber(sYOpts.oSize) : (browseObj.edge ? 10 : 0);
|
|
6838
|
+
scrollYStore.offsetSize = offsetYSize;
|
|
6839
|
+
scrollYStore.visibleSize = visibleYSize;
|
|
6840
|
+
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
6841
|
+
updateYData();
|
|
6842
|
+
}
|
|
6843
|
+
else {
|
|
6844
|
+
updateYSpace();
|
|
6845
|
+
}
|
|
6846
|
+
});
|
|
6847
|
+
};
|
|
6848
|
+
/**
|
|
6849
|
+
* 清除滚动条
|
|
6850
|
+
*/
|
|
6851
|
+
const clearScroll = () => {
|
|
6852
|
+
const scrollBodyElem = refVirtualWrapper.value;
|
|
6853
|
+
if (scrollBodyElem) {
|
|
6854
|
+
scrollBodyElem.scrollTop = 0;
|
|
6855
|
+
}
|
|
6856
|
+
return nextTick();
|
|
6857
|
+
};
|
|
6858
|
+
/**
|
|
6859
|
+
* 如果有滚动条,则滚动到对应的位置
|
|
6860
|
+
*/
|
|
6861
|
+
const scrollTo = (scrollLeft, scrollTop) => {
|
|
6862
|
+
const scrollBodyElem = refVirtualWrapper.value;
|
|
6863
|
+
if (scrollLeft) {
|
|
6864
|
+
if (!XEUtils.isNumber(scrollLeft)) {
|
|
6865
|
+
scrollTop = scrollLeft.top;
|
|
6866
|
+
scrollLeft = scrollLeft.left;
|
|
6867
|
+
}
|
|
6868
|
+
}
|
|
6869
|
+
if (XEUtils.isNumber(scrollLeft)) {
|
|
6870
|
+
scrollBodyElem.scrollLeft = scrollLeft;
|
|
6871
|
+
}
|
|
6872
|
+
if (XEUtils.isNumber(scrollTop)) {
|
|
6873
|
+
scrollBodyElem.scrollTop = scrollTop;
|
|
6874
|
+
}
|
|
6875
|
+
if (reactData.scrollYLoad) {
|
|
6876
|
+
return new Promise(resolve => {
|
|
6877
|
+
setTimeout(() => {
|
|
6878
|
+
nextTick(() => {
|
|
6879
|
+
resolve();
|
|
6880
|
+
});
|
|
6881
|
+
}, 50);
|
|
6882
|
+
});
|
|
6883
|
+
}
|
|
6884
|
+
return nextTick();
|
|
6885
|
+
};
|
|
6886
|
+
/**
|
|
6887
|
+
* 刷新滚动条
|
|
6888
|
+
*/
|
|
6889
|
+
const refreshScroll = () => {
|
|
6890
|
+
const { lastScrollLeft, lastScrollTop } = internalData;
|
|
6891
|
+
return clearScroll().then(() => {
|
|
6892
|
+
if (lastScrollLeft || lastScrollTop) {
|
|
6893
|
+
internalData.lastScrollLeft = 0;
|
|
6894
|
+
internalData.lastScrollTop = 0;
|
|
6895
|
+
return scrollTo(lastScrollLeft, lastScrollTop);
|
|
6896
|
+
}
|
|
6897
|
+
});
|
|
6898
|
+
};
|
|
6899
|
+
/**
|
|
6900
|
+
* 重新计算列表
|
|
6901
|
+
*/
|
|
6902
|
+
const recalculate = () => {
|
|
6903
|
+
const el = refElem.value;
|
|
6904
|
+
if (el) {
|
|
6905
|
+
const parentEl = el.parentElement;
|
|
6906
|
+
reactData.parentHeight = parentEl ? parentEl.clientHeight : 0;
|
|
6907
|
+
updateHeight();
|
|
6908
|
+
if (el.clientWidth && el.clientHeight) {
|
|
6909
|
+
return computeScrollLoad();
|
|
6910
|
+
}
|
|
6911
|
+
}
|
|
6912
|
+
return nextTick();
|
|
6913
|
+
};
|
|
6914
|
+
const loadYData = (evnt) => {
|
|
6915
|
+
const { scrollYStore } = internalData;
|
|
6916
|
+
const { startIndex, endIndex, visibleSize, offsetSize, rowHeight } = scrollYStore;
|
|
6917
|
+
const scrollBodyElem = evnt.target;
|
|
6918
|
+
const scrollTop = scrollBodyElem.scrollTop;
|
|
6919
|
+
const toVisibleIndex = Math.floor(scrollTop / rowHeight);
|
|
6920
|
+
const offsetStartIndex = Math.max(0, toVisibleIndex - 1 - offsetSize);
|
|
6921
|
+
const offsetEndIndex = toVisibleIndex + visibleSize + offsetSize;
|
|
6922
|
+
if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
|
|
6923
|
+
if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
|
|
6924
|
+
scrollYStore.startIndex = offsetStartIndex;
|
|
6925
|
+
scrollYStore.endIndex = offsetEndIndex;
|
|
6926
|
+
updateYData();
|
|
6927
|
+
}
|
|
6928
|
+
}
|
|
6929
|
+
};
|
|
6930
|
+
const scrollEvent = (evnt) => {
|
|
6931
|
+
const scrollBodyElem = evnt.target;
|
|
6932
|
+
const scrollTop = scrollBodyElem.scrollTop;
|
|
6933
|
+
const scrollLeft = scrollBodyElem.scrollLeft;
|
|
6934
|
+
const isX = scrollLeft !== internalData.lastScrollLeft;
|
|
6935
|
+
const isY = scrollTop !== internalData.lastScrollTop;
|
|
6936
|
+
internalData.lastScrollTop = scrollTop;
|
|
6937
|
+
internalData.lastScrollLeft = scrollLeft;
|
|
6938
|
+
if (reactData.scrollYLoad) {
|
|
6939
|
+
loadYData(evnt);
|
|
6940
|
+
}
|
|
6941
|
+
dispatchEvent('scroll', { scrollLeft, scrollTop, isX, isY }, evnt);
|
|
6942
|
+
};
|
|
6943
|
+
/**
|
|
6944
|
+
* 加载数据
|
|
6945
|
+
* @param {Array} datas 数据
|
|
6946
|
+
*/
|
|
6947
|
+
const loadData = (datas) => {
|
|
6948
|
+
const { scrollYStore } = internalData;
|
|
6949
|
+
const sYOpts = computeSYOpts.value;
|
|
6950
|
+
const fullData = datas || [];
|
|
6951
|
+
Object.assign(scrollYStore, {
|
|
6952
|
+
startIndex: 0,
|
|
6953
|
+
endIndex: 1,
|
|
6954
|
+
visibleSize: 0
|
|
6955
|
+
});
|
|
6956
|
+
internalData.fullData = fullData;
|
|
6957
|
+
// 如果gt为0,则总是启用
|
|
6958
|
+
reactData.scrollYLoad = !!sYOpts.enabled && sYOpts.gt > -1 && (sYOpts.gt === 0 || sYOpts.gt <= fullData.length);
|
|
6959
|
+
handleData();
|
|
6960
|
+
return computeScrollLoad().then(() => {
|
|
6961
|
+
refreshScroll();
|
|
6962
|
+
});
|
|
6963
|
+
};
|
|
6964
|
+
const listMethods = {
|
|
6965
|
+
dispatchEvent,
|
|
6966
|
+
loadData,
|
|
6967
|
+
/**
|
|
6968
|
+
* 重新加载数据
|
|
6969
|
+
* @param {Array} datas 数据
|
|
6970
|
+
*/
|
|
6971
|
+
reloadData(datas) {
|
|
6972
|
+
clearScroll();
|
|
6973
|
+
return loadData(datas);
|
|
6974
|
+
},
|
|
6975
|
+
recalculate,
|
|
6976
|
+
scrollTo,
|
|
6977
|
+
refreshScroll,
|
|
6978
|
+
clearScroll
|
|
6979
|
+
};
|
|
6980
|
+
Object.assign($xeList, listMethods);
|
|
6981
|
+
const renderVN = () => {
|
|
6982
|
+
const { className, loading } = props;
|
|
6983
|
+
const { bodyHeight, topSpaceHeight, items } = reactData;
|
|
6984
|
+
const defaultSlot = slots.default;
|
|
6985
|
+
const vSize = computeSize.value;
|
|
6986
|
+
const styles = computeStyles.value;
|
|
6987
|
+
return h('div', {
|
|
6988
|
+
ref: refElem,
|
|
6989
|
+
class: ['vxe-list', className ? (XEUtils.isFunction(className) ? className({ $list: $xeList }) : className) : '', {
|
|
6990
|
+
[`size--${vSize}`]: vSize,
|
|
6991
|
+
'is--loading': loading
|
|
6992
|
+
}]
|
|
6993
|
+
}, [
|
|
6994
|
+
h('div', {
|
|
6995
|
+
ref: refVirtualWrapper,
|
|
6996
|
+
class: 'vxe-list--virtual-wrapper',
|
|
6997
|
+
style: styles,
|
|
6998
|
+
onScroll: scrollEvent
|
|
6999
|
+
}, [
|
|
7000
|
+
h('div', {
|
|
7001
|
+
class: 'vxe-list--y-space',
|
|
7002
|
+
style: {
|
|
7003
|
+
height: bodyHeight ? `${bodyHeight}px` : ''
|
|
7004
|
+
}
|
|
7005
|
+
}),
|
|
7006
|
+
h('div', {
|
|
7007
|
+
ref: refVirtualBody,
|
|
7008
|
+
class: 'vxe-list--body',
|
|
7009
|
+
style: {
|
|
7010
|
+
marginTop: topSpaceHeight ? `${topSpaceHeight}px` : ''
|
|
7011
|
+
}
|
|
7012
|
+
}, defaultSlot ? defaultSlot({ items, $list: $xeList }) : [])
|
|
7013
|
+
]),
|
|
7014
|
+
/**
|
|
7015
|
+
* 加载中
|
|
7016
|
+
*/
|
|
7017
|
+
h(VxeLoadingComponent, {
|
|
7018
|
+
class: 'vxe-list--loading',
|
|
7019
|
+
modelValue: loading
|
|
7020
|
+
})
|
|
7021
|
+
]);
|
|
7022
|
+
};
|
|
7023
|
+
const dataFlag = ref(0);
|
|
7024
|
+
watch(() => props.data ? props.data.length : -1, () => {
|
|
7025
|
+
dataFlag.value++;
|
|
7026
|
+
});
|
|
7027
|
+
watch(() => props.data, () => {
|
|
7028
|
+
dataFlag.value++;
|
|
7029
|
+
});
|
|
7030
|
+
watch(dataFlag, () => {
|
|
7031
|
+
loadData(props.data || []);
|
|
7032
|
+
});
|
|
7033
|
+
watch(() => props.height, () => {
|
|
7034
|
+
recalculate();
|
|
7035
|
+
});
|
|
7036
|
+
watch(() => props.maxHeight, () => {
|
|
7037
|
+
recalculate();
|
|
7038
|
+
});
|
|
7039
|
+
watch(() => props.syncResize, (value) => {
|
|
7040
|
+
if (value) {
|
|
7041
|
+
recalculate();
|
|
7042
|
+
nextTick(() => setTimeout(() => recalculate()));
|
|
7043
|
+
}
|
|
7044
|
+
});
|
|
7045
|
+
onActivated(() => {
|
|
7046
|
+
recalculate().then(() => refreshScroll());
|
|
7047
|
+
});
|
|
7048
|
+
nextTick(() => {
|
|
7049
|
+
loadData(props.data || []);
|
|
7050
|
+
});
|
|
7051
|
+
onMounted(() => {
|
|
7052
|
+
recalculate();
|
|
7053
|
+
if (props.autoResize) {
|
|
7054
|
+
const el = refElem.value;
|
|
7055
|
+
const resizeObserver = globalResize.create(() => recalculate());
|
|
7056
|
+
resizeObserver.observe(el);
|
|
7057
|
+
if (el) {
|
|
7058
|
+
resizeObserver.observe(el.parentElement);
|
|
7059
|
+
}
|
|
7060
|
+
internalData.resizeObserver = resizeObserver;
|
|
7061
|
+
}
|
|
7062
|
+
globalEvents.on($xeList, 'resize', recalculate);
|
|
7063
|
+
});
|
|
7064
|
+
onBeforeUnmount(() => {
|
|
7065
|
+
const { resizeObserver } = internalData;
|
|
7066
|
+
if (resizeObserver) {
|
|
7067
|
+
resizeObserver.disconnect();
|
|
7068
|
+
}
|
|
7069
|
+
globalEvents.off($xeList, 'resize');
|
|
7070
|
+
XEUtils.assign(reactData, createReactData$9());
|
|
7071
|
+
XEUtils.assign(internalData, createInternalData$c());
|
|
7072
|
+
});
|
|
7073
|
+
$xeList.renderVN = renderVN;
|
|
7074
|
+
return $xeList;
|
|
7075
|
+
},
|
|
7076
|
+
render() {
|
|
7077
|
+
return this.renderVN();
|
|
6698
7078
|
}
|
|
6699
|
-
|
|
6700
|
-
}
|
|
7079
|
+
});
|
|
6701
7080
|
|
|
6702
7081
|
function handleNumber(val) {
|
|
6703
7082
|
return XEUtils.isString(val) ? val.replace(/[^0-9e.-]/g, '') : val;
|
|
6704
7083
|
}
|
|
6705
|
-
function toFloatValueFixed(inputValue, digitsValue) {
|
|
6706
|
-
if (
|
|
6707
|
-
|
|
7084
|
+
function toFloatValueFixed(inputValue, type, digitsValue, roundingMode) {
|
|
7085
|
+
if (type !== 'integer' && (!roundingMode || roundingMode === 'default')) {
|
|
7086
|
+
// 默认截取忽略
|
|
7087
|
+
if (/^-/.test('' + inputValue)) {
|
|
7088
|
+
return XEUtils.toFixed(XEUtils.ceil(inputValue, digitsValue), digitsValue);
|
|
7089
|
+
}
|
|
7090
|
+
return XEUtils.toFixed(XEUtils.floor(inputValue, digitsValue), digitsValue);
|
|
7091
|
+
}
|
|
7092
|
+
else {
|
|
7093
|
+
if (roundingMode === 'ceil') {
|
|
7094
|
+
return XEUtils.toFixed(XEUtils.ceil(inputValue, digitsValue), digitsValue);
|
|
7095
|
+
}
|
|
7096
|
+
if (roundingMode === 'floor') {
|
|
7097
|
+
return XEUtils.toFixed(XEUtils.floor(inputValue, digitsValue), digitsValue);
|
|
7098
|
+
}
|
|
7099
|
+
return XEUtils.toFixed(XEUtils.round(inputValue, digitsValue), digitsValue);
|
|
6708
7100
|
}
|
|
6709
|
-
return XEUtils.toFixed(XEUtils.floor(inputValue, digitsValue), digitsValue);
|
|
6710
7101
|
}
|
|
6711
7102
|
|
|
6712
7103
|
var VxeInputComponent = defineVxeComponent({
|
|
@@ -7442,7 +7833,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
7442
7833
|
const { type, exponential } = props;
|
|
7443
7834
|
const inpMaxLength = computeInpMaxLength.value;
|
|
7444
7835
|
const digitsValue = computeDigitsValue.value;
|
|
7445
|
-
const restVal = (type === 'float' ? toFloatValueFixed(val, digitsValue) : XEUtils.toValueString(val));
|
|
7836
|
+
const restVal = (type === 'float' ? toFloatValueFixed(val, type, digitsValue, '') : XEUtils.toValueString(val));
|
|
7446
7837
|
if (exponential && (val === restVal || XEUtils.toValueString(val).toLowerCase() === XEUtils.toNumber(restVal).toExponential())) {
|
|
7447
7838
|
return val;
|
|
7448
7839
|
}
|
|
@@ -7628,7 +8019,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
7628
8019
|
}
|
|
7629
8020
|
else if (type === 'float') {
|
|
7630
8021
|
if (inputValue) {
|
|
7631
|
-
const validValue = toFloatValueFixed(inputValue, digitsValue);
|
|
8022
|
+
const validValue = toFloatValueFixed(inputValue, type, digitsValue, '');
|
|
7632
8023
|
if (inputValue !== validValue) {
|
|
7633
8024
|
handleChange(validValue, { type: 'init' });
|
|
7634
8025
|
}
|
|
@@ -9383,14 +9774,48 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9383
9774
|
}
|
|
9384
9775
|
});
|
|
9385
9776
|
|
|
9386
|
-
|
|
9777
|
+
/**
|
|
9778
|
+
* 生成节点的唯一主键
|
|
9779
|
+
*/
|
|
9780
|
+
function getNodeUniqueId$1() {
|
|
9387
9781
|
return XEUtils.uniqueId('node_');
|
|
9388
9782
|
}
|
|
9389
|
-
function
|
|
9783
|
+
function createReactData$8() {
|
|
9784
|
+
return {
|
|
9785
|
+
initialized: false,
|
|
9786
|
+
searchValue: '',
|
|
9787
|
+
searchLoading: false,
|
|
9788
|
+
currentCunkList: [],
|
|
9789
|
+
currentItems: [],
|
|
9790
|
+
currentNode: null,
|
|
9791
|
+
panelIndex: 0,
|
|
9792
|
+
panelStyle: {},
|
|
9793
|
+
panelPlacement: null,
|
|
9794
|
+
triggerFocusPanel: false,
|
|
9795
|
+
visiblePanel: false,
|
|
9796
|
+
isAniVisible: false,
|
|
9797
|
+
isActivated: false,
|
|
9798
|
+
selectRadioKey: null,
|
|
9799
|
+
treeList: [],
|
|
9800
|
+
updateExpandedFlag: 1,
|
|
9801
|
+
updateCheckboxFlag: 1,
|
|
9802
|
+
fullOptFlag: 1,
|
|
9803
|
+
lazyOptFlag: 1
|
|
9804
|
+
};
|
|
9805
|
+
}
|
|
9806
|
+
function createInternalData$b() {
|
|
9390
9807
|
return {
|
|
9391
9808
|
// hpTimeout: undefined,
|
|
9392
|
-
|
|
9393
|
-
|
|
9809
|
+
afterTreeList: [],
|
|
9810
|
+
treeFullData: [],
|
|
9811
|
+
afterVisibleList: [],
|
|
9812
|
+
nodeMaps: {},
|
|
9813
|
+
fullNodeMaps: {},
|
|
9814
|
+
lazyNodeMaps: {},
|
|
9815
|
+
indeterminateRowMaps: {},
|
|
9816
|
+
selectCheckboxMaps: {},
|
|
9817
|
+
treeExpandedMaps: {},
|
|
9818
|
+
treeExpandLazyLoadedMaps: {}
|
|
9394
9819
|
};
|
|
9395
9820
|
}
|
|
9396
9821
|
var VxeCascaderComponent = defineVxeComponent({
|
|
@@ -9413,25 +9838,41 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9413
9838
|
},
|
|
9414
9839
|
filterable: Boolean,
|
|
9415
9840
|
filterConfig: Object,
|
|
9841
|
+
showFullLabel: {
|
|
9842
|
+
type: Boolean,
|
|
9843
|
+
default: getConfig$3().cascader.showFullLabel
|
|
9844
|
+
},
|
|
9845
|
+
separator: {
|
|
9846
|
+
type: String,
|
|
9847
|
+
default: getConfig$3().cascader.separator
|
|
9848
|
+
},
|
|
9416
9849
|
multiple: Boolean,
|
|
9417
9850
|
className: [String, Function],
|
|
9418
9851
|
prefixIcon: String,
|
|
9419
|
-
placement: String,
|
|
9420
|
-
transform: Boolean,
|
|
9421
9852
|
lazyOptions: Array,
|
|
9422
9853
|
options: Array,
|
|
9423
9854
|
optionProps: Object,
|
|
9424
|
-
zIndex: Number,
|
|
9425
9855
|
size: {
|
|
9426
9856
|
type: String,
|
|
9427
9857
|
default: () => getConfig$3().cascader.size || getConfig$3().size
|
|
9428
9858
|
},
|
|
9859
|
+
treeConfig: Object,
|
|
9860
|
+
radioConfig: Object,
|
|
9861
|
+
checkboxConfig: Object,
|
|
9429
9862
|
remote: Boolean,
|
|
9430
9863
|
remoteConfig: Function,
|
|
9431
9864
|
popupConfig: Object,
|
|
9432
|
-
|
|
9865
|
+
checkedClosable: {
|
|
9866
|
+
type: Boolean,
|
|
9867
|
+
default: () => getConfig$3().cascader.checkedClosable
|
|
9868
|
+
},
|
|
9869
|
+
clearClosable: {
|
|
9870
|
+
type: Boolean,
|
|
9871
|
+
default: () => getConfig$3().cascader.clearClosable
|
|
9872
|
+
},
|
|
9873
|
+
showCloseButton: {
|
|
9433
9874
|
type: Boolean,
|
|
9434
|
-
default: () => getConfig$3().cascader.
|
|
9875
|
+
default: () => getConfig$3().cascader.showCloseButton
|
|
9435
9876
|
},
|
|
9436
9877
|
showTotalButton: {
|
|
9437
9878
|
type: Boolean,
|
|
@@ -9444,16 +9885,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9444
9885
|
showClearButton: {
|
|
9445
9886
|
type: Boolean,
|
|
9446
9887
|
default: () => getConfig$3().cascader.showClearButton
|
|
9447
|
-
}
|
|
9448
|
-
transfer: {
|
|
9449
|
-
type: Boolean,
|
|
9450
|
-
default: null
|
|
9451
|
-
},
|
|
9452
|
-
/**
|
|
9453
|
-
* 已废弃,被 remote-config.queryMethod 替换
|
|
9454
|
-
* @deprecated
|
|
9455
|
-
*/
|
|
9456
|
-
remoteMethod: Function
|
|
9888
|
+
}
|
|
9457
9889
|
},
|
|
9458
9890
|
emits: [
|
|
9459
9891
|
'update:modelValue',
|
|
@@ -9463,7 +9895,14 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9463
9895
|
'blur',
|
|
9464
9896
|
'focus',
|
|
9465
9897
|
'click',
|
|
9466
|
-
'node-click'
|
|
9898
|
+
'node-click',
|
|
9899
|
+
'node-expand',
|
|
9900
|
+
'current-change',
|
|
9901
|
+
'radio-change',
|
|
9902
|
+
'checkbox-change',
|
|
9903
|
+
'load-success',
|
|
9904
|
+
'load-error',
|
|
9905
|
+
'visible-change'
|
|
9467
9906
|
],
|
|
9468
9907
|
setup(props, context) {
|
|
9469
9908
|
const { emit, slots } = context;
|
|
@@ -9477,22 +9916,10 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9477
9916
|
const refElem = ref();
|
|
9478
9917
|
const refInput = ref();
|
|
9479
9918
|
const refInpSearch = ref();
|
|
9480
|
-
const
|
|
9919
|
+
const refChunkWrapper = ref();
|
|
9481
9920
|
const refOptionPanel = ref();
|
|
9482
|
-
const
|
|
9483
|
-
const
|
|
9484
|
-
initialized: false,
|
|
9485
|
-
searchValue: '',
|
|
9486
|
-
searchLoading: false,
|
|
9487
|
-
panelIndex: 0,
|
|
9488
|
-
panelStyle: {},
|
|
9489
|
-
panelPlacement: null,
|
|
9490
|
-
triggerFocusPanel: false,
|
|
9491
|
-
visiblePanel: false,
|
|
9492
|
-
isAniVisible: false,
|
|
9493
|
-
isActivated: false
|
|
9494
|
-
});
|
|
9495
|
-
const internalData = createInternalData$c();
|
|
9921
|
+
const reactData = reactive(createReactData$8());
|
|
9922
|
+
const internalData = createInternalData$b();
|
|
9496
9923
|
const refMaps = {
|
|
9497
9924
|
refElem
|
|
9498
9925
|
};
|
|
@@ -9517,17 +9944,24 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9517
9944
|
return disabled;
|
|
9518
9945
|
});
|
|
9519
9946
|
const computeBtnTransfer = computed(() => {
|
|
9520
|
-
const
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
return globalTransfer;
|
|
9525
|
-
}
|
|
9526
|
-
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
9527
|
-
return true;
|
|
9528
|
-
}
|
|
9947
|
+
const popupOpts = computePopupOpts.value;
|
|
9948
|
+
const { transfer } = popupOpts;
|
|
9949
|
+
if (XEUtils.isBoolean(transfer)) {
|
|
9950
|
+
return transfer;
|
|
9529
9951
|
}
|
|
9530
|
-
|
|
9952
|
+
if ($xeTable || $xeModal || $xeDrawer || $xeForm) {
|
|
9953
|
+
return true;
|
|
9954
|
+
}
|
|
9955
|
+
return false;
|
|
9956
|
+
});
|
|
9957
|
+
const computeTreeOpts = computed(() => {
|
|
9958
|
+
return Object.assign({}, getConfig$3().cascader.treeConfig, props.treeConfig);
|
|
9959
|
+
});
|
|
9960
|
+
const computeRadioOpts = computed(() => {
|
|
9961
|
+
return Object.assign({}, getConfig$3().cascader.radioConfig, props.radioConfig);
|
|
9962
|
+
});
|
|
9963
|
+
const computeCheckboxOpts = computed(() => {
|
|
9964
|
+
return Object.assign({}, getConfig$3().cascader.checkboxConfig, props.checkboxConfig);
|
|
9531
9965
|
});
|
|
9532
9966
|
const computePopupOpts = computed(() => {
|
|
9533
9967
|
return Object.assign({}, getConfig$3().cascader.popupConfig, props.popupConfig);
|
|
@@ -9535,10 +9969,6 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9535
9969
|
const computePropsOpts = computed(() => {
|
|
9536
9970
|
return props.optionProps || {};
|
|
9537
9971
|
});
|
|
9538
|
-
const computeNodeKeyField = computed(() => {
|
|
9539
|
-
const valueField = computeValueField.value;
|
|
9540
|
-
return valueField;
|
|
9541
|
-
});
|
|
9542
9972
|
const computeLabelField = computed(() => {
|
|
9543
9973
|
const propsOpts = computePropsOpts.value;
|
|
9544
9974
|
return propsOpts.label || 'label';
|
|
@@ -9547,46 +9977,72 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9547
9977
|
const propsOpts = computePropsOpts.value;
|
|
9548
9978
|
return propsOpts.value || 'value';
|
|
9549
9979
|
});
|
|
9980
|
+
const computeKeyField = computed(() => {
|
|
9981
|
+
const treeOpts = computeTreeOpts.value;
|
|
9982
|
+
return treeOpts.keyField || 'id';
|
|
9983
|
+
});
|
|
9984
|
+
const computeParentField = computed(() => {
|
|
9985
|
+
const treeOpts = computeTreeOpts.value;
|
|
9986
|
+
return treeOpts.parentField || 'parentId';
|
|
9987
|
+
});
|
|
9550
9988
|
const computeChildrenField = computed(() => {
|
|
9551
|
-
const
|
|
9552
|
-
return
|
|
9989
|
+
const treeOpts = computeTreeOpts.value;
|
|
9990
|
+
return treeOpts.childrenField || 'children';
|
|
9991
|
+
});
|
|
9992
|
+
const computeMapChildrenField = computed(() => {
|
|
9993
|
+
const treeOpts = computeTreeOpts.value;
|
|
9994
|
+
return treeOpts.mapChildrenField || 'mapChildren';
|
|
9995
|
+
});
|
|
9996
|
+
const computeHasChildField = computed(() => {
|
|
9997
|
+
const treeOpts = computeTreeOpts.value;
|
|
9998
|
+
return treeOpts.hasChildField || 'hasChild';
|
|
9553
9999
|
});
|
|
9554
10000
|
const computeRemoteOpts = computed(() => {
|
|
9555
10001
|
return Object.assign({}, getConfig$3().cascader.remoteConfig, props.remoteConfig);
|
|
9556
10002
|
});
|
|
10003
|
+
const computeSelectVals = computed(() => {
|
|
10004
|
+
const { modelValue } = props;
|
|
10005
|
+
return XEUtils.eqNull(modelValue) ? [] : (XEUtils.isArray(modelValue) ? modelValue : [modelValue]);
|
|
10006
|
+
});
|
|
9557
10007
|
const computeSelectLabel = computed(() => {
|
|
9558
|
-
const {
|
|
9559
|
-
const {
|
|
9560
|
-
const
|
|
10008
|
+
const { showFullLabel } = props;
|
|
10009
|
+
const { fullOptFlag, lazyOptFlag } = reactData;
|
|
10010
|
+
const { fullNodeMaps, lazyNodeMaps } = internalData;
|
|
9561
10011
|
const labelField = computeLabelField.value;
|
|
9562
|
-
const selectVals =
|
|
10012
|
+
const selectVals = computeSelectVals.value;
|
|
9563
10013
|
return selectVals.map(val => {
|
|
9564
10014
|
const cacheItem = fullNodeMaps[val];
|
|
9565
|
-
if (cacheItem) {
|
|
9566
|
-
return cacheItem.item[labelField];
|
|
10015
|
+
if (fullOptFlag && cacheItem) {
|
|
10016
|
+
return showFullLabel ? cacheItem.fullLabel : cacheItem.item[labelField];
|
|
9567
10017
|
}
|
|
9568
|
-
if (
|
|
9569
|
-
const
|
|
9570
|
-
if (
|
|
9571
|
-
return
|
|
10018
|
+
if (lazyOptFlag) {
|
|
10019
|
+
const lazyCacheItem = lazyNodeMaps[val];
|
|
10020
|
+
if (lazyCacheItem) {
|
|
10021
|
+
return showFullLabel ? lazyCacheItem.fullLabel : lazyCacheItem.item[labelField];
|
|
9572
10022
|
}
|
|
9573
10023
|
}
|
|
9574
10024
|
return val;
|
|
9575
10025
|
}).join(', ');
|
|
9576
10026
|
});
|
|
9577
10027
|
const computePopupWrapperStyle = computed(() => {
|
|
10028
|
+
const { currentCunkList, panelStyle } = reactData;
|
|
9578
10029
|
const popupOpts = computePopupOpts.value;
|
|
9579
|
-
const { height,
|
|
9580
|
-
const stys = {};
|
|
9581
|
-
if (width) {
|
|
9582
|
-
stys.width = toCssUnit(width);
|
|
9583
|
-
}
|
|
10030
|
+
const { height, nodeWidth, nodeHeight } = popupOpts;
|
|
10031
|
+
const stys = Object.assign(Object.assign({}, panelStyle), { '--vxe-ui-cascader-chunk-size': currentCunkList.length });
|
|
9584
10032
|
if (height) {
|
|
9585
|
-
stys
|
|
9586
|
-
|
|
10033
|
+
stys['--vxe-ui-cascader-chunk-height'] = toCssUnit(height);
|
|
10034
|
+
}
|
|
10035
|
+
if (nodeWidth) {
|
|
10036
|
+
stys['--vxe-ui-cascader-node-width'] = toCssUnit(nodeWidth);
|
|
10037
|
+
}
|
|
10038
|
+
if (nodeHeight) {
|
|
10039
|
+
stys['--vxe-ui-cascader-node-height'] = toCssUnit(nodeHeight);
|
|
9587
10040
|
}
|
|
9588
10041
|
return stys;
|
|
9589
10042
|
});
|
|
10043
|
+
const computeFilterOpts = computed(() => {
|
|
10044
|
+
return Object.assign({}, getConfig$3().cascader.filterConfig, props.filterConfig);
|
|
10045
|
+
});
|
|
9590
10046
|
const computeMaps = {};
|
|
9591
10047
|
const $xeCascader = {
|
|
9592
10048
|
xID,
|
|
@@ -9606,48 +10062,318 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9606
10062
|
const cascaderMethods = {
|
|
9607
10063
|
dispatchEvent
|
|
9608
10064
|
};
|
|
9609
|
-
const
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
10065
|
+
const getNodeId = (node) => {
|
|
10066
|
+
if (!node) {
|
|
10067
|
+
return '';
|
|
10068
|
+
}
|
|
10069
|
+
const valueField = computeValueField.value;
|
|
10070
|
+
const nodeKey = node[valueField];
|
|
10071
|
+
return enNodeValue$1(nodeKey);
|
|
9613
10072
|
};
|
|
9614
|
-
const
|
|
9615
|
-
const {
|
|
9616
|
-
const
|
|
10073
|
+
const isCheckedByCheckboxNodeId = (nodeid) => {
|
|
10074
|
+
const { updateCheckboxFlag } = reactData;
|
|
10075
|
+
const { selectCheckboxMaps } = internalData;
|
|
10076
|
+
return !!(updateCheckboxFlag && selectCheckboxMaps[nodeid]);
|
|
10077
|
+
};
|
|
10078
|
+
const handleCheckedCheckboxNode = (nodeList, checked) => {
|
|
10079
|
+
const { selectCheckboxMaps } = internalData;
|
|
10080
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
9617
10081
|
const childrenField = computeChildrenField.value;
|
|
10082
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
10083
|
+
const { checkStrictly } = checkboxOpts;
|
|
10084
|
+
const treeOpts = computeTreeOpts.value;
|
|
10085
|
+
const { transform } = treeOpts;
|
|
10086
|
+
const handleSelect = (node) => {
|
|
10087
|
+
const nodeid = getNodeId(node);
|
|
10088
|
+
{
|
|
10089
|
+
if (!selectCheckboxMaps[nodeid]) {
|
|
10090
|
+
selectCheckboxMaps[nodeid] = node;
|
|
10091
|
+
}
|
|
10092
|
+
}
|
|
10093
|
+
};
|
|
10094
|
+
if (checkStrictly) {
|
|
10095
|
+
nodeList.forEach(handleSelect);
|
|
10096
|
+
}
|
|
10097
|
+
else {
|
|
10098
|
+
XEUtils.eachTree(nodeList, handleSelect, { children: transform ? mapChildrenField : childrenField });
|
|
10099
|
+
}
|
|
10100
|
+
reactData.updateCheckboxFlag++;
|
|
10101
|
+
updateCheckboxStatus();
|
|
10102
|
+
};
|
|
10103
|
+
const createNode = (records) => {
|
|
9618
10104
|
const valueField = computeValueField.value;
|
|
9619
|
-
|
|
10105
|
+
return Promise.resolve(records.map(obj => {
|
|
10106
|
+
const item = Object.assign({}, obj);
|
|
10107
|
+
let nodeid = getNodeId(item);
|
|
10108
|
+
if (!nodeid) {
|
|
10109
|
+
nodeid = getNodeUniqueId$1();
|
|
10110
|
+
XEUtils.set(item, valueField, nodeid);
|
|
10111
|
+
}
|
|
10112
|
+
return item;
|
|
10113
|
+
}));
|
|
10114
|
+
};
|
|
10115
|
+
const cacheNodeMap = () => {
|
|
10116
|
+
const { separator } = props;
|
|
10117
|
+
const { treeFullData } = internalData;
|
|
10118
|
+
const valueField = computeValueField.value;
|
|
10119
|
+
const labelField = computeLabelField.value;
|
|
10120
|
+
const childrenField = computeChildrenField.value;
|
|
9620
10121
|
const keyMaps = {};
|
|
9621
|
-
const
|
|
9622
|
-
|
|
10122
|
+
const fullMaps = {};
|
|
10123
|
+
XEUtils.eachTree(treeFullData, (item, index, items, path, parenItem, nodes) => {
|
|
10124
|
+
let nodeid = getNodeId(item);
|
|
9623
10125
|
if (!nodeid) {
|
|
9624
|
-
nodeid =
|
|
10126
|
+
nodeid = getNodeUniqueId$1();
|
|
10127
|
+
item[valueField] = nodeid;
|
|
9625
10128
|
}
|
|
9626
|
-
|
|
9627
|
-
|
|
10129
|
+
const nodeVal = item[valueField];
|
|
10130
|
+
const itemRest = {
|
|
10131
|
+
item,
|
|
10132
|
+
index,
|
|
10133
|
+
$index: -1,
|
|
10134
|
+
_index: -1,
|
|
10135
|
+
items,
|
|
10136
|
+
parent: parenItem,
|
|
10137
|
+
nodes,
|
|
10138
|
+
level: nodes.length - 1,
|
|
10139
|
+
treeIndex: index,
|
|
10140
|
+
lineCount: 0,
|
|
10141
|
+
treeLoaded: false,
|
|
10142
|
+
fullLabel: nodes.map(item => item[labelField]).join((separator || ' / '))
|
|
10143
|
+
};
|
|
10144
|
+
keyMaps[nodeid] = itemRest;
|
|
10145
|
+
fullMaps[nodeVal] = itemRest;
|
|
10146
|
+
}, { children: childrenField });
|
|
10147
|
+
internalData.nodeMaps = keyMaps;
|
|
10148
|
+
internalData.fullNodeMaps = fullMaps;
|
|
10149
|
+
reactData.fullOptFlag++;
|
|
10150
|
+
};
|
|
10151
|
+
const updateAfterDataIndex = () => {
|
|
10152
|
+
const { separator } = props;
|
|
10153
|
+
const { afterTreeList, nodeMaps } = internalData;
|
|
10154
|
+
const labelField = computeLabelField.value;
|
|
10155
|
+
const childrenField = computeChildrenField.value;
|
|
10156
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
10157
|
+
const treeOpts = computeTreeOpts.value;
|
|
10158
|
+
const { transform } = treeOpts;
|
|
10159
|
+
let vtIndex = 0;
|
|
10160
|
+
XEUtils.eachTree(afterTreeList, (item, index, items, path, parenItem, nodes) => {
|
|
10161
|
+
const nodeid = getNodeId(item);
|
|
10162
|
+
const nodeItem = nodeMaps[nodeid];
|
|
10163
|
+
if (nodeItem) {
|
|
10164
|
+
nodeItem.items = items;
|
|
10165
|
+
nodeItem.treeIndex = index;
|
|
10166
|
+
nodeItem._index = vtIndex;
|
|
9628
10167
|
}
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
10168
|
+
else {
|
|
10169
|
+
const rest = {
|
|
10170
|
+
item,
|
|
10171
|
+
index,
|
|
10172
|
+
$index: -1,
|
|
10173
|
+
_index: vtIndex,
|
|
10174
|
+
items,
|
|
10175
|
+
parent: parenItem,
|
|
10176
|
+
nodes,
|
|
10177
|
+
level: nodes.length - 1,
|
|
10178
|
+
treeIndex: index,
|
|
10179
|
+
lineCount: 0,
|
|
10180
|
+
treeLoaded: false,
|
|
10181
|
+
fullLabel: nodes.map(item => item[labelField]).join((separator || ' / '))
|
|
10182
|
+
};
|
|
10183
|
+
nodeMaps[nodeid] = rest;
|
|
10184
|
+
}
|
|
10185
|
+
vtIndex++;
|
|
10186
|
+
}, { children: transform ? mapChildrenField : childrenField });
|
|
10187
|
+
};
|
|
10188
|
+
const updateAfterFullData = () => {
|
|
10189
|
+
const { searchValue } = reactData;
|
|
10190
|
+
const { treeFullData, lastFilterValue } = internalData;
|
|
10191
|
+
const labelField = computeLabelField.value;
|
|
10192
|
+
const childrenField = computeChildrenField.value;
|
|
10193
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
10194
|
+
const treeOpts = computeTreeOpts.value;
|
|
10195
|
+
const { transform } = treeOpts;
|
|
10196
|
+
const filterOpts = computeFilterOpts.value;
|
|
10197
|
+
const { beforeFilterMethod, filterMethod, afterFilterMethod } = filterOpts;
|
|
10198
|
+
let fullList = treeFullData;
|
|
10199
|
+
let treeList = fullList;
|
|
10200
|
+
let filterStr = '';
|
|
10201
|
+
if (searchValue) {
|
|
10202
|
+
filterStr = `${searchValue}`;
|
|
10203
|
+
const handleSearch = filterMethod
|
|
10204
|
+
? (item) => {
|
|
10205
|
+
return filterMethod({
|
|
10206
|
+
$cascader: $xeCascader,
|
|
10207
|
+
node: item,
|
|
10208
|
+
filterValue: filterStr
|
|
10209
|
+
});
|
|
10210
|
+
}
|
|
10211
|
+
: (item) => {
|
|
10212
|
+
return String(item[labelField]).toLowerCase().indexOf(filterStr.toLowerCase()) > -1;
|
|
10213
|
+
};
|
|
10214
|
+
const bafParams = { $cascader: $xeCascader, filterValue: filterStr };
|
|
10215
|
+
if (beforeFilterMethod) {
|
|
10216
|
+
beforeFilterMethod(bafParams);
|
|
9633
10217
|
}
|
|
9634
|
-
nodeMaps[value] = { item, index, items, parent, nodes };
|
|
9635
|
-
};
|
|
9636
|
-
if (options) {
|
|
9637
10218
|
if (transform) {
|
|
9638
|
-
|
|
9639
|
-
|
|
10219
|
+
treeList = XEUtils.searchTree(treeFullData, handleSearch, {
|
|
10220
|
+
original: true,
|
|
10221
|
+
isEvery: true,
|
|
10222
|
+
children: childrenField,
|
|
10223
|
+
mapChildren: mapChildrenField
|
|
9640
10224
|
});
|
|
10225
|
+
fullList = treeList;
|
|
9641
10226
|
}
|
|
9642
10227
|
else {
|
|
9643
|
-
|
|
10228
|
+
fullList = treeFullData.filter(handleSearch);
|
|
9644
10229
|
}
|
|
10230
|
+
internalData.lastFilterValue = filterStr;
|
|
10231
|
+
nextTick(() => {
|
|
10232
|
+
if (afterFilterMethod) {
|
|
10233
|
+
afterFilterMethod(bafParams);
|
|
10234
|
+
}
|
|
10235
|
+
});
|
|
9645
10236
|
}
|
|
9646
|
-
|
|
9647
|
-
|
|
10237
|
+
else {
|
|
10238
|
+
if (transform) {
|
|
10239
|
+
treeList = XEUtils.searchTree(treeFullData, () => true, {
|
|
10240
|
+
original: true,
|
|
10241
|
+
isEvery: true,
|
|
10242
|
+
children: childrenField,
|
|
10243
|
+
mapChildren: mapChildrenField
|
|
10244
|
+
});
|
|
10245
|
+
fullList = treeList;
|
|
10246
|
+
if (lastFilterValue) {
|
|
10247
|
+
const bafParams = { $cascader: $xeCascader, filterValue: filterStr };
|
|
10248
|
+
if (beforeFilterMethod) {
|
|
10249
|
+
beforeFilterMethod(bafParams);
|
|
10250
|
+
}
|
|
10251
|
+
// 取消筛选时自动收起
|
|
10252
|
+
nextTick(() => {
|
|
10253
|
+
if (afterFilterMethod) {
|
|
10254
|
+
afterFilterMethod(bafParams);
|
|
10255
|
+
}
|
|
10256
|
+
});
|
|
10257
|
+
}
|
|
10258
|
+
}
|
|
10259
|
+
internalData.lastFilterValue = '';
|
|
10260
|
+
}
|
|
10261
|
+
internalData.afterVisibleList = fullList;
|
|
10262
|
+
internalData.afterTreeList = treeList;
|
|
10263
|
+
updateAfterDataIndex();
|
|
10264
|
+
};
|
|
10265
|
+
/**
|
|
10266
|
+
* 如果为虚拟树、则将树结构拍平
|
|
10267
|
+
*/
|
|
10268
|
+
const handleTreeToList = () => {
|
|
10269
|
+
const { afterTreeList, treeExpandedMaps } = internalData;
|
|
10270
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
10271
|
+
const treeOpts = computeTreeOpts.value;
|
|
10272
|
+
const { transform } = treeOpts;
|
|
10273
|
+
const expandMaps = {};
|
|
10274
|
+
if (transform) {
|
|
10275
|
+
const fullData = [];
|
|
10276
|
+
XEUtils.eachTree(afterTreeList, (item, index, items, path, parentRow) => {
|
|
10277
|
+
const nodeid = getNodeId(item);
|
|
10278
|
+
const parentNodeid = getNodeId(parentRow);
|
|
10279
|
+
if (!parentRow || (expandMaps[parentNodeid] && treeExpandedMaps[parentNodeid])) {
|
|
10280
|
+
expandMaps[nodeid] = 1;
|
|
10281
|
+
fullData.push(item);
|
|
10282
|
+
}
|
|
10283
|
+
}, { children: mapChildrenField });
|
|
10284
|
+
internalData.afterVisibleList = fullData;
|
|
10285
|
+
return fullData;
|
|
10286
|
+
}
|
|
10287
|
+
return internalData.afterVisibleList;
|
|
10288
|
+
};
|
|
10289
|
+
const handleData = (force) => {
|
|
10290
|
+
const { nodeMaps } = internalData;
|
|
10291
|
+
let fullList = internalData.afterVisibleList;
|
|
10292
|
+
if (force) {
|
|
10293
|
+
// 更新数据,处理筛选和排序
|
|
10294
|
+
updateAfterFullData();
|
|
10295
|
+
// 如果为虚拟树,将树结构拍平
|
|
10296
|
+
fullList = handleTreeToList();
|
|
10297
|
+
}
|
|
10298
|
+
const treeList = fullList.slice(0);
|
|
10299
|
+
treeList.forEach((item, $index) => {
|
|
10300
|
+
const nodeid = getNodeId(item);
|
|
10301
|
+
const itemRest = nodeMaps[nodeid];
|
|
10302
|
+
if (itemRest) {
|
|
10303
|
+
itemRest.$index = $index;
|
|
10304
|
+
}
|
|
10305
|
+
});
|
|
10306
|
+
reactData.treeList = treeList;
|
|
10307
|
+
};
|
|
10308
|
+
const triggerSearchEvent = XEUtils.debounce(() => handleData(true), 350, { trailing: true });
|
|
10309
|
+
const loadData = (list) => {
|
|
10310
|
+
const treeOpts = computeTreeOpts.value;
|
|
10311
|
+
const keyField = computeKeyField.value;
|
|
10312
|
+
const parentField = computeParentField.value;
|
|
10313
|
+
const childrenField = computeChildrenField.value;
|
|
10314
|
+
const { rootParentValue, rootValues } = treeOpts;
|
|
10315
|
+
const { transform } = treeOpts;
|
|
10316
|
+
const fullData = transform
|
|
10317
|
+
? XEUtils.toArrayTree(list, {
|
|
10318
|
+
key: keyField,
|
|
10319
|
+
parentKey: parentField,
|
|
10320
|
+
mapChildren: childrenField,
|
|
10321
|
+
rootParentValue,
|
|
10322
|
+
rootValues
|
|
10323
|
+
})
|
|
10324
|
+
: list ? list.slice(0) : [];
|
|
10325
|
+
internalData.treeFullData = fullData;
|
|
10326
|
+
cacheNodeMap();
|
|
10327
|
+
handleData(true);
|
|
10328
|
+
handleCurrentItems();
|
|
10329
|
+
updateCurrentChunk();
|
|
10330
|
+
return nextTick();
|
|
10331
|
+
};
|
|
10332
|
+
const updateCurrentChunk = () => {
|
|
10333
|
+
const { currentItems } = reactData;
|
|
10334
|
+
const { treeFullData } = internalData;
|
|
10335
|
+
const childrenField = computeChildrenField.value;
|
|
10336
|
+
const currentCunkList = [treeFullData];
|
|
10337
|
+
if (currentItems.length) {
|
|
10338
|
+
let chunkIndex = 0;
|
|
10339
|
+
let stNodeid = currentItems[chunkIndex];
|
|
10340
|
+
let optList = treeFullData;
|
|
10341
|
+
while (stNodeid && optList && optList.length) {
|
|
10342
|
+
stNodeid = currentItems[chunkIndex++];
|
|
10343
|
+
const currOption = optList.find(item => stNodeid === getNodeId(item));
|
|
10344
|
+
optList = currOption ? currOption[childrenField] : [];
|
|
10345
|
+
if (!optList || !optList.length) {
|
|
10346
|
+
break;
|
|
10347
|
+
}
|
|
10348
|
+
currentCunkList.push(optList);
|
|
10349
|
+
}
|
|
10350
|
+
}
|
|
10351
|
+
reactData.currentCunkList = currentCunkList;
|
|
10352
|
+
};
|
|
10353
|
+
const handleCurrentItems = () => {
|
|
10354
|
+
const { treeFullData } = internalData;
|
|
10355
|
+
const selectVals = computeSelectVals.value;
|
|
10356
|
+
const childrenField = computeChildrenField.value;
|
|
10357
|
+
const stItems = [];
|
|
10358
|
+
const expandedMaps = {};
|
|
10359
|
+
if (selectVals.length) {
|
|
10360
|
+
const lastVal = XEUtils.last(selectVals);
|
|
10361
|
+
const stRest = XEUtils.findTree(treeFullData, (item) => lastVal === getNodeId(item), { children: childrenField });
|
|
10362
|
+
if (stRest) {
|
|
10363
|
+
const { nodes } = stRest;
|
|
10364
|
+
nodes.forEach(item => {
|
|
10365
|
+
const nodeid = getNodeId(item);
|
|
10366
|
+
expandedMaps[nodeid] = true;
|
|
10367
|
+
stItems.push(nodeid);
|
|
10368
|
+
});
|
|
10369
|
+
}
|
|
10370
|
+
}
|
|
10371
|
+
internalData.treeExpandedMaps = expandedMaps;
|
|
10372
|
+
reactData.currentItems = stItems;
|
|
9648
10373
|
};
|
|
9649
10374
|
const updateZindex = () => {
|
|
9650
|
-
const
|
|
10375
|
+
const popupOpts = computePopupOpts.value;
|
|
10376
|
+
const { zIndex } = popupOpts;
|
|
9651
10377
|
if (zIndex) {
|
|
9652
10378
|
reactData.panelIndex = zIndex;
|
|
9653
10379
|
}
|
|
@@ -9656,7 +10382,6 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9656
10382
|
}
|
|
9657
10383
|
};
|
|
9658
10384
|
const updatePlacement = () => {
|
|
9659
|
-
const { placement } = props;
|
|
9660
10385
|
const { panelIndex } = reactData;
|
|
9661
10386
|
const targetElem = refElem.value;
|
|
9662
10387
|
const panelElem = refOptionPanel.value;
|
|
@@ -9664,9 +10389,10 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9664
10389
|
const popupOpts = computePopupOpts.value;
|
|
9665
10390
|
const handleStyle = () => {
|
|
9666
10391
|
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
|
9667
|
-
placement: popupOpts.placement
|
|
10392
|
+
placement: popupOpts.placement,
|
|
9668
10393
|
defaultPlacement: popupOpts.defaultPlacement,
|
|
9669
|
-
teleportTo: btnTransfer
|
|
10394
|
+
teleportTo: btnTransfer,
|
|
10395
|
+
isMinWidth: false
|
|
9670
10396
|
});
|
|
9671
10397
|
const panelStyle = Object.assign(ppObj.style, {
|
|
9672
10398
|
zIndex: panelIndex
|
|
@@ -9677,9 +10403,9 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9677
10403
|
handleStyle();
|
|
9678
10404
|
return nextTick().then(handleStyle);
|
|
9679
10405
|
};
|
|
9680
|
-
const showOptionPanel = () => {
|
|
10406
|
+
const showOptionPanel = (evnt) => {
|
|
9681
10407
|
const { loading, remote, filterable } = props;
|
|
9682
|
-
const {
|
|
10408
|
+
const { treeFullData } = internalData;
|
|
9683
10409
|
const isDisabled = computeIsDisabled.value;
|
|
9684
10410
|
const remoteOpts = computeRemoteOpts.value;
|
|
9685
10411
|
if (!loading && !isDisabled) {
|
|
@@ -9690,7 +10416,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9690
10416
|
reactData.isActivated = true;
|
|
9691
10417
|
reactData.isAniVisible = true;
|
|
9692
10418
|
if (filterable) {
|
|
9693
|
-
if (remote && remoteOpts.enabled && remoteOpts.autoLoad && !
|
|
10419
|
+
if (remote && remoteOpts.enabled && remoteOpts.autoLoad && !treeFullData.length) {
|
|
9694
10420
|
handleSearchEvent();
|
|
9695
10421
|
}
|
|
9696
10422
|
}
|
|
@@ -9700,16 +10426,55 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9700
10426
|
}, 10);
|
|
9701
10427
|
updateZindex();
|
|
9702
10428
|
updatePlacement();
|
|
10429
|
+
dispatchEvent('visible-change', { visible: true }, evnt || null);
|
|
9703
10430
|
}
|
|
9704
10431
|
};
|
|
9705
|
-
const hideOptionPanel = () => {
|
|
10432
|
+
const hideOptionPanel = (evnt) => {
|
|
9706
10433
|
reactData.visiblePanel = false;
|
|
9707
10434
|
internalData.hpTimeout = setTimeout(() => {
|
|
9708
10435
|
reactData.isAniVisible = false;
|
|
9709
10436
|
}, 350);
|
|
10437
|
+
dispatchEvent('visible-change', { visible: false }, evnt || null);
|
|
10438
|
+
};
|
|
10439
|
+
const setCurrentNode = (node) => {
|
|
10440
|
+
reactData.currentNode = node;
|
|
10441
|
+
return nextTick();
|
|
10442
|
+
};
|
|
10443
|
+
const setAllCheckboxNode = (checked) => {
|
|
10444
|
+
const selectMaps = {};
|
|
10445
|
+
const childrenField = computeChildrenField.value;
|
|
10446
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
10447
|
+
const treeOpts = computeTreeOpts.value;
|
|
10448
|
+
const { transform } = treeOpts;
|
|
10449
|
+
const checkKeys = [];
|
|
10450
|
+
const checkNodes = [];
|
|
10451
|
+
{
|
|
10452
|
+
XEUtils.eachTree(internalData.afterTreeList, (node) => {
|
|
10453
|
+
const nodeid = getNodeId(node);
|
|
10454
|
+
checkKeys.push(nodeid);
|
|
10455
|
+
checkNodes.push(node);
|
|
10456
|
+
selectMaps[nodeid] = true;
|
|
10457
|
+
}, { children: transform ? mapChildrenField : childrenField });
|
|
10458
|
+
}
|
|
10459
|
+
internalData.indeterminateRowMaps = {};
|
|
10460
|
+
internalData.selectCheckboxMaps = selectMaps;
|
|
10461
|
+
reactData.updateCheckboxFlag++;
|
|
10462
|
+
updateCheckboxStatus();
|
|
10463
|
+
return nextTick().then(() => {
|
|
10464
|
+
return { checkNodeKeys: checkKeys, checkNodes };
|
|
10465
|
+
});
|
|
10466
|
+
};
|
|
10467
|
+
const clearCheckboxNode = () => {
|
|
10468
|
+
internalData.indeterminateRowMaps = {};
|
|
10469
|
+
internalData.selectCheckboxMaps = {};
|
|
10470
|
+
reactData.updateCheckboxFlag++;
|
|
10471
|
+
updateCheckboxStatus();
|
|
10472
|
+
return nextTick().then(() => {
|
|
10473
|
+
return { checkNodeKeys: [], checkNodes: [] };
|
|
10474
|
+
});
|
|
9710
10475
|
};
|
|
9711
10476
|
const changeEvent = (evnt, selectValue, node) => {
|
|
9712
|
-
const value = XEUtils.isArray(selectValue) ? selectValue.map(deNodeValue) : deNodeValue(selectValue);
|
|
10477
|
+
const value = XEUtils.isArray(selectValue) ? selectValue.map(deNodeValue$1) : deNodeValue$1(selectValue);
|
|
9713
10478
|
emitModel(value);
|
|
9714
10479
|
if (value !== props.modelValue) {
|
|
9715
10480
|
dispatchEvent('change', { value, node, option: node }, evnt);
|
|
@@ -9725,103 +10490,438 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9725
10490
|
};
|
|
9726
10491
|
const clearEvent = (params, evnt) => {
|
|
9727
10492
|
clearValueEvent(evnt, null);
|
|
9728
|
-
hideOptionPanel();
|
|
10493
|
+
hideOptionPanel(evnt);
|
|
9729
10494
|
};
|
|
9730
10495
|
const allCheckedPanelEvent = (params) => {
|
|
9731
10496
|
const { $event } = params;
|
|
9732
|
-
const { multiple,
|
|
9733
|
-
const $tree = refTree.value;
|
|
10497
|
+
const { multiple, checkedClosable } = props;
|
|
9734
10498
|
if (multiple) {
|
|
9735
|
-
|
|
9736
|
-
$
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
});
|
|
9743
|
-
}
|
|
10499
|
+
setAllCheckboxNode().then(({ checkNodeKeys, checkNodes }) => {
|
|
10500
|
+
changeEvent($event, checkNodeKeys, checkNodes[0]);
|
|
10501
|
+
dispatchEvent('all-change', { value: checkNodeKeys }, $event);
|
|
10502
|
+
if (checkedClosable) {
|
|
10503
|
+
hideOptionPanel($event);
|
|
10504
|
+
}
|
|
10505
|
+
});
|
|
9744
10506
|
}
|
|
9745
10507
|
};
|
|
9746
10508
|
const clearCheckedPanelEvent = (params) => {
|
|
9747
10509
|
const { $event } = params;
|
|
9748
|
-
const { multiple,
|
|
9749
|
-
const
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
10510
|
+
const { multiple, checkedClosable } = props;
|
|
10511
|
+
const value = multiple ? [] : null;
|
|
10512
|
+
clearCheckboxNode().then(() => {
|
|
10513
|
+
if (checkedClosable) {
|
|
10514
|
+
hideOptionPanel($event);
|
|
10515
|
+
}
|
|
10516
|
+
});
|
|
10517
|
+
changeEvent($event, value, null);
|
|
10518
|
+
dispatchEvent('clear', { value }, $event);
|
|
10519
|
+
};
|
|
10520
|
+
const closePanelEvent = (params) => {
|
|
10521
|
+
const { $event } = params;
|
|
10522
|
+
hideOptionPanel($event);
|
|
10523
|
+
};
|
|
10524
|
+
const handleGlobalMousewheelEvent = (evnt) => {
|
|
10525
|
+
const { visiblePanel } = reactData;
|
|
10526
|
+
const isDisabled = computeIsDisabled.value;
|
|
10527
|
+
if (!isDisabled) {
|
|
10528
|
+
if (visiblePanel) {
|
|
10529
|
+
const panelElem = refOptionPanel.value;
|
|
10530
|
+
if (getEventTargetNode(evnt, panelElem).flag) {
|
|
10531
|
+
updatePlacement();
|
|
10532
|
+
}
|
|
10533
|
+
else {
|
|
10534
|
+
hideOptionPanel(evnt);
|
|
10535
|
+
}
|
|
10536
|
+
}
|
|
10537
|
+
}
|
|
10538
|
+
};
|
|
10539
|
+
const handleGlobalMousedownEvent = (evnt) => {
|
|
10540
|
+
const { visiblePanel } = reactData;
|
|
10541
|
+
const isDisabled = computeIsDisabled.value;
|
|
10542
|
+
if (!isDisabled) {
|
|
10543
|
+
const el = refElem.value;
|
|
10544
|
+
const panelElem = refOptionPanel.value;
|
|
10545
|
+
reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
|
|
10546
|
+
if (visiblePanel && !reactData.isActivated) {
|
|
10547
|
+
hideOptionPanel(evnt);
|
|
10548
|
+
}
|
|
10549
|
+
}
|
|
10550
|
+
};
|
|
10551
|
+
const handleGlobalBlurEvent = (evnt) => {
|
|
10552
|
+
const { visiblePanel, isActivated } = reactData;
|
|
10553
|
+
if (visiblePanel) {
|
|
10554
|
+
hideOptionPanel(evnt);
|
|
10555
|
+
}
|
|
10556
|
+
if (isActivated) {
|
|
10557
|
+
reactData.isActivated = false;
|
|
10558
|
+
}
|
|
10559
|
+
if (visiblePanel || isActivated) {
|
|
10560
|
+
const $input = refInput.value;
|
|
10561
|
+
if ($input) {
|
|
10562
|
+
$input.blur();
|
|
10563
|
+
}
|
|
10564
|
+
}
|
|
10565
|
+
};
|
|
10566
|
+
const handleGlobalResizeEvent = () => {
|
|
10567
|
+
const { visiblePanel } = reactData;
|
|
10568
|
+
if (visiblePanel) {
|
|
10569
|
+
updatePlacement();
|
|
10570
|
+
}
|
|
10571
|
+
};
|
|
10572
|
+
const handleFocusSearch = () => {
|
|
10573
|
+
if (props.filterable) {
|
|
10574
|
+
nextTick(() => {
|
|
10575
|
+
const inpSearch = refInpSearch.value;
|
|
10576
|
+
if (inpSearch) {
|
|
10577
|
+
inpSearch.focus();
|
|
10578
|
+
}
|
|
10579
|
+
});
|
|
10580
|
+
}
|
|
10581
|
+
};
|
|
10582
|
+
const changeCurrentEvent = (evnt, node) => {
|
|
10583
|
+
evnt.preventDefault();
|
|
10584
|
+
const isChecked = true;
|
|
10585
|
+
reactData.currentNode = node;
|
|
10586
|
+
dispatchEvent('current-change', { node, checked: isChecked }, evnt);
|
|
10587
|
+
};
|
|
10588
|
+
const changeRadioEvent = (evnt, node) => {
|
|
10589
|
+
evnt.preventDefault();
|
|
10590
|
+
evnt.stopPropagation();
|
|
10591
|
+
const { nodeMaps } = internalData;
|
|
10592
|
+
const radioOpts = computeRadioOpts.value;
|
|
10593
|
+
const childrenField = computeChildrenField.value;
|
|
10594
|
+
const { checkMode, checkMethod } = radioOpts;
|
|
10595
|
+
const nodeid = getNodeId(node);
|
|
10596
|
+
const childList = node[childrenField];
|
|
10597
|
+
const isExistChild = childList && childList.length > 0;
|
|
10598
|
+
const nodeItem = nodeMaps[nodeid] || {};
|
|
10599
|
+
const nLevel = nodeItem.level;
|
|
10600
|
+
const isDisabled = checkMethod ? !checkMethod({ $cascader: $xeCascader, node }) : !handleVisibleOrCheckMode(checkMode, isExistChild, nLevel);
|
|
10601
|
+
if (isDisabled) {
|
|
10602
|
+
return;
|
|
10603
|
+
}
|
|
10604
|
+
const value = nodeid;
|
|
10605
|
+
reactData.selectRadioKey = value;
|
|
10606
|
+
changeEvent(evnt, value, node);
|
|
10607
|
+
hideOptionPanel(evnt);
|
|
10608
|
+
};
|
|
10609
|
+
const handleAsyncTreeExpandChilds = (node) => {
|
|
10610
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
10611
|
+
const treeOpts = computeTreeOpts.value;
|
|
10612
|
+
const { loadMethod } = treeOpts;
|
|
10613
|
+
const { checkStrictly } = checkboxOpts;
|
|
10614
|
+
return new Promise(resolve => {
|
|
10615
|
+
if (loadMethod) {
|
|
10616
|
+
const { nodeMaps } = internalData;
|
|
10617
|
+
const nodeid = getNodeId(node);
|
|
10618
|
+
const nodeItem = nodeMaps[nodeid];
|
|
10619
|
+
internalData.treeExpandLazyLoadedMaps[nodeid] = true;
|
|
10620
|
+
Promise.resolve(loadMethod({ $cascader: $xeCascader, node })).then((childRecords) => {
|
|
10621
|
+
const { treeExpandLazyLoadedMaps } = internalData;
|
|
10622
|
+
nodeItem.treeLoaded = true;
|
|
10623
|
+
if (treeExpandLazyLoadedMaps[nodeid]) {
|
|
10624
|
+
treeExpandLazyLoadedMaps[nodeid] = false;
|
|
10625
|
+
}
|
|
10626
|
+
if (!XEUtils.isArray(childRecords)) {
|
|
10627
|
+
childRecords = [];
|
|
10628
|
+
}
|
|
10629
|
+
if (childRecords) {
|
|
10630
|
+
return $xeCascader.loadChildrenNode(node, childRecords).then(childRows => {
|
|
10631
|
+
const { treeExpandedMaps } = internalData;
|
|
10632
|
+
if (childRows.length && !treeExpandedMaps[nodeid]) {
|
|
10633
|
+
treeExpandedMaps[nodeid] = true;
|
|
10634
|
+
}
|
|
10635
|
+
reactData.updateExpandedFlag++;
|
|
10636
|
+
// 如果当前节点已选中,则展开后子节点也被选中
|
|
10637
|
+
if (!checkStrictly && $xeCascader.isCheckedByCheckboxNodeId(nodeid)) {
|
|
10638
|
+
handleCheckedCheckboxNode(childRows);
|
|
10639
|
+
}
|
|
10640
|
+
dispatchEvent('load-success', { node, data: childRecords }, new Event('load-success'));
|
|
10641
|
+
return nextTick();
|
|
10642
|
+
});
|
|
10643
|
+
}
|
|
10644
|
+
else {
|
|
10645
|
+
dispatchEvent('load-success', { node, data: childRecords }, new Event('load-success'));
|
|
10646
|
+
}
|
|
10647
|
+
}).catch((e) => {
|
|
10648
|
+
const { treeExpandLazyLoadedMaps } = internalData;
|
|
10649
|
+
nodeItem.treeLoaded = false;
|
|
10650
|
+
if (treeExpandLazyLoadedMaps[nodeid]) {
|
|
10651
|
+
treeExpandLazyLoadedMaps[nodeid] = false;
|
|
10652
|
+
}
|
|
10653
|
+
dispatchEvent('load-error', { node, data: e }, new Event('load-error'));
|
|
10654
|
+
}).finally(() => {
|
|
10655
|
+
handleTreeToList();
|
|
10656
|
+
handleData();
|
|
10657
|
+
});
|
|
10658
|
+
}
|
|
10659
|
+
else {
|
|
10660
|
+
resolve();
|
|
10661
|
+
}
|
|
10662
|
+
});
|
|
10663
|
+
};
|
|
10664
|
+
/**
|
|
10665
|
+
* 展开与收起树节点
|
|
10666
|
+
* @param nodeList
|
|
10667
|
+
* @param expanded
|
|
10668
|
+
* @returns
|
|
10669
|
+
*/
|
|
10670
|
+
const handleBaseTreeExpand = (nodeList, expanded) => {
|
|
10671
|
+
const { treeExpandLazyLoadedMaps, treeExpandedMaps } = internalData;
|
|
10672
|
+
const { nodeMaps } = internalData;
|
|
10673
|
+
const childrenField = computeChildrenField.value;
|
|
10674
|
+
const hasChildField = computeHasChildField.value;
|
|
10675
|
+
const treeOpts = computeTreeOpts.value;
|
|
10676
|
+
const { lazy, toggleMethod } = treeOpts;
|
|
10677
|
+
const result = [];
|
|
10678
|
+
let validNodes = toggleMethod ? nodeList.filter((node) => toggleMethod({ $cascader: $xeCascader, expanded, node })) : nodeList;
|
|
10679
|
+
validNodes = validNodes.length ? [validNodes[validNodes.length - 1]] : [];
|
|
10680
|
+
// 同一级只能展开一个
|
|
10681
|
+
const nodeid = getNodeId(validNodes[0]);
|
|
10682
|
+
const nodeItem = nodeMaps[nodeid];
|
|
10683
|
+
if (nodeItem) {
|
|
10684
|
+
nodeItem.items.forEach(item => {
|
|
10685
|
+
const itemNodeId = getNodeId(item);
|
|
10686
|
+
if (treeExpandedMaps[itemNodeId]) {
|
|
10687
|
+
delete treeExpandedMaps[itemNodeId];
|
|
10688
|
+
}
|
|
10689
|
+
});
|
|
10690
|
+
}
|
|
10691
|
+
{
|
|
10692
|
+
validNodes.forEach((item) => {
|
|
10693
|
+
const itemNodeId = getNodeId(item);
|
|
10694
|
+
if (!treeExpandedMaps[itemNodeId]) {
|
|
10695
|
+
const nodeItem = nodeMaps[itemNodeId];
|
|
10696
|
+
const isLoad = lazy && item[hasChildField] && !nodeItem.treeLoaded && !treeExpandLazyLoadedMaps[itemNodeId];
|
|
10697
|
+
// 是否使用懒加载
|
|
10698
|
+
if (isLoad) {
|
|
10699
|
+
result.push(handleAsyncTreeExpandChilds(item));
|
|
10700
|
+
}
|
|
10701
|
+
else {
|
|
10702
|
+
if (item[childrenField] && item[childrenField].length) {
|
|
10703
|
+
treeExpandedMaps[itemNodeId] = true;
|
|
10704
|
+
}
|
|
10705
|
+
}
|
|
9755
10706
|
}
|
|
9756
10707
|
});
|
|
9757
|
-
changeEvent($event, value, null);
|
|
9758
|
-
dispatchEvent('clear', { value }, $event);
|
|
9759
10708
|
}
|
|
10709
|
+
reactData.updateExpandedFlag++;
|
|
10710
|
+
handleTreeToList();
|
|
10711
|
+
handleData();
|
|
10712
|
+
return Promise.all(result);
|
|
9760
10713
|
};
|
|
9761
|
-
const
|
|
9762
|
-
const {
|
|
9763
|
-
const
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
10714
|
+
const toggleExpandEvent = (evnt, node, chunks, chunkIndex) => {
|
|
10715
|
+
const { currentItems } = reactData;
|
|
10716
|
+
const { treeExpandLazyLoadedMaps } = internalData;
|
|
10717
|
+
const treeOpts = computeTreeOpts.value;
|
|
10718
|
+
const { lazy } = treeOpts;
|
|
10719
|
+
const stItems = currentItems.slice(0, chunkIndex);
|
|
10720
|
+
const nodeid = getNodeId(node);
|
|
10721
|
+
const expanded = true;
|
|
10722
|
+
evnt.stopPropagation();
|
|
10723
|
+
stItems.push(nodeid);
|
|
10724
|
+
reactData.currentItems = stItems;
|
|
10725
|
+
if (!lazy || !treeExpandLazyLoadedMaps[nodeid]) {
|
|
10726
|
+
handleBaseTreeExpand([node], expanded);
|
|
10727
|
+
}
|
|
10728
|
+
setCurrentNode(node);
|
|
10729
|
+
updateCurrentChunk();
|
|
10730
|
+
dispatchEvent('node-expand', { node, expanded }, evnt);
|
|
10731
|
+
};
|
|
10732
|
+
const updateCheckboxStatus = () => {
|
|
10733
|
+
const { selectCheckboxMaps, indeterminateRowMaps, afterTreeList } = internalData;
|
|
10734
|
+
const childrenField = computeChildrenField.value;
|
|
10735
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
10736
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
10737
|
+
const { checkStrictly, checkMethod } = checkboxOpts;
|
|
10738
|
+
const treeOpts = computeTreeOpts.value;
|
|
10739
|
+
const { transform } = treeOpts;
|
|
10740
|
+
if (!checkStrictly) {
|
|
10741
|
+
const childRowMaps = {};
|
|
10742
|
+
const childRowList = [];
|
|
10743
|
+
XEUtils.eachTree(afterTreeList, (node) => {
|
|
10744
|
+
const nodeid = getNodeId(node);
|
|
10745
|
+
const childList = node[childrenField];
|
|
10746
|
+
if (childList && childList.length && !childRowMaps[nodeid]) {
|
|
10747
|
+
childRowMaps[nodeid] = 1;
|
|
10748
|
+
childRowList.unshift([node, nodeid, childList]);
|
|
10749
|
+
}
|
|
10750
|
+
}, { children: transform ? mapChildrenField : childrenField });
|
|
10751
|
+
childRowList.forEach(vals => {
|
|
10752
|
+
const node = vals[0];
|
|
10753
|
+
const nodeid = vals[1];
|
|
10754
|
+
const childList = vals[2];
|
|
10755
|
+
let sLen = 0; // 已选
|
|
10756
|
+
let hLen = 0; // 半选
|
|
10757
|
+
let vLen = 0; // 有效子行
|
|
10758
|
+
const cLen = childList.length; // 子行
|
|
10759
|
+
childList.forEach(checkMethod
|
|
10760
|
+
? (item) => {
|
|
10761
|
+
const childNodeid = getNodeId(item);
|
|
10762
|
+
const isSelect = selectCheckboxMaps[childNodeid];
|
|
10763
|
+
if (checkMethod({ $cascader: $xeCascader, node: item })) {
|
|
10764
|
+
if (isSelect) {
|
|
10765
|
+
sLen++;
|
|
10766
|
+
}
|
|
10767
|
+
else if (indeterminateRowMaps[childNodeid]) {
|
|
10768
|
+
hLen++;
|
|
10769
|
+
}
|
|
10770
|
+
vLen++;
|
|
10771
|
+
}
|
|
10772
|
+
else {
|
|
10773
|
+
if (isSelect) {
|
|
10774
|
+
sLen++;
|
|
10775
|
+
}
|
|
10776
|
+
else if (indeterminateRowMaps[childNodeid]) {
|
|
10777
|
+
hLen++;
|
|
10778
|
+
}
|
|
10779
|
+
}
|
|
10780
|
+
}
|
|
10781
|
+
: item => {
|
|
10782
|
+
const childNodeid = getNodeId(item);
|
|
10783
|
+
const isSelect = selectCheckboxMaps[childNodeid];
|
|
10784
|
+
if (isSelect) {
|
|
10785
|
+
sLen++;
|
|
10786
|
+
}
|
|
10787
|
+
else if (indeterminateRowMaps[childNodeid]) {
|
|
10788
|
+
hLen++;
|
|
10789
|
+
}
|
|
10790
|
+
vLen++;
|
|
10791
|
+
});
|
|
10792
|
+
let isSelected = false;
|
|
10793
|
+
if (cLen > 0) {
|
|
10794
|
+
if (vLen > 0) {
|
|
10795
|
+
isSelected = (sLen > 0 || hLen > 0) && sLen >= vLen;
|
|
10796
|
+
}
|
|
10797
|
+
else {
|
|
10798
|
+
// 如果存在子项禁用
|
|
10799
|
+
if ((sLen > 0 && sLen >= vLen)) {
|
|
10800
|
+
isSelected = true;
|
|
10801
|
+
}
|
|
10802
|
+
else if (selectCheckboxMaps[nodeid]) {
|
|
10803
|
+
isSelected = true;
|
|
10804
|
+
}
|
|
10805
|
+
else {
|
|
10806
|
+
isSelected = false;
|
|
10807
|
+
}
|
|
10808
|
+
}
|
|
9769
10809
|
}
|
|
9770
10810
|
else {
|
|
9771
|
-
|
|
10811
|
+
// 如果无子项
|
|
10812
|
+
isSelected = selectCheckboxMaps[nodeid];
|
|
9772
10813
|
}
|
|
9773
|
-
|
|
10814
|
+
const halfSelect = !isSelected && (sLen > 0 || hLen > 0);
|
|
10815
|
+
if (isSelected) {
|
|
10816
|
+
selectCheckboxMaps[nodeid] = node;
|
|
10817
|
+
if (indeterminateRowMaps[nodeid]) {
|
|
10818
|
+
delete indeterminateRowMaps[nodeid];
|
|
10819
|
+
}
|
|
10820
|
+
}
|
|
10821
|
+
else {
|
|
10822
|
+
if (selectCheckboxMaps[nodeid]) {
|
|
10823
|
+
delete selectCheckboxMaps[nodeid];
|
|
10824
|
+
}
|
|
10825
|
+
if (halfSelect) {
|
|
10826
|
+
indeterminateRowMaps[nodeid] = node;
|
|
10827
|
+
}
|
|
10828
|
+
else {
|
|
10829
|
+
if (indeterminateRowMaps[nodeid]) {
|
|
10830
|
+
delete indeterminateRowMaps[nodeid];
|
|
10831
|
+
}
|
|
10832
|
+
}
|
|
10833
|
+
}
|
|
10834
|
+
});
|
|
10835
|
+
reactData.updateCheckboxFlag++;
|
|
9774
10836
|
}
|
|
9775
10837
|
};
|
|
9776
|
-
const
|
|
9777
|
-
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9782
|
-
|
|
9783
|
-
|
|
9784
|
-
|
|
9785
|
-
|
|
10838
|
+
const changeCheckboxEvent = (evnt, node) => {
|
|
10839
|
+
evnt.preventDefault();
|
|
10840
|
+
evnt.stopPropagation();
|
|
10841
|
+
const { selectCheckboxMaps, nodeMaps } = internalData;
|
|
10842
|
+
const childrenField = computeChildrenField.value;
|
|
10843
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
10844
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
10845
|
+
const { checkStrictly, checkMode, checkMethod } = checkboxOpts;
|
|
10846
|
+
const treeOpts = computeTreeOpts.value;
|
|
10847
|
+
const { transform } = treeOpts;
|
|
10848
|
+
const nodeid = getNodeId(node);
|
|
10849
|
+
const childList = node[childrenField];
|
|
10850
|
+
const isExistChild = childList && childList.length > 0;
|
|
10851
|
+
const nodeItem = nodeMaps[nodeid] || {};
|
|
10852
|
+
const nLevel = nodeItem.level;
|
|
10853
|
+
const isDisabled = checkMethod ? !checkMethod({ $cascader: $xeCascader, node }) : !handleVisibleOrCheckMode(checkMode, isExistChild, nLevel);
|
|
10854
|
+
if (isDisabled) {
|
|
10855
|
+
return;
|
|
9786
10856
|
}
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
if (visiblePanel) {
|
|
9791
|
-
hideOptionPanel();
|
|
10857
|
+
let isChecked = false;
|
|
10858
|
+
if (selectCheckboxMaps[nodeid]) {
|
|
10859
|
+
delete selectCheckboxMaps[nodeid];
|
|
9792
10860
|
}
|
|
9793
|
-
|
|
9794
|
-
|
|
10861
|
+
else {
|
|
10862
|
+
isChecked = true;
|
|
10863
|
+
selectCheckboxMaps[nodeid] = node;
|
|
9795
10864
|
}
|
|
9796
|
-
if (
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
10865
|
+
if (!checkStrictly) {
|
|
10866
|
+
XEUtils.eachTree(XEUtils.get(node, transform ? mapChildrenField : childrenField), (childNode) => {
|
|
10867
|
+
const childNodeid = getNodeId(childNode);
|
|
10868
|
+
if (isChecked) {
|
|
10869
|
+
if (!selectCheckboxMaps[childNodeid]) {
|
|
10870
|
+
selectCheckboxMaps[childNodeid] = true;
|
|
10871
|
+
}
|
|
10872
|
+
}
|
|
10873
|
+
else {
|
|
10874
|
+
if (selectCheckboxMaps[childNodeid]) {
|
|
10875
|
+
delete selectCheckboxMaps[childNodeid];
|
|
10876
|
+
}
|
|
10877
|
+
}
|
|
10878
|
+
}, { children: transform ? mapChildrenField : childrenField });
|
|
9801
10879
|
}
|
|
10880
|
+
reactData.updateCheckboxFlag++;
|
|
10881
|
+
updateCheckboxStatus();
|
|
10882
|
+
const nodeids = XEUtils.keys(selectCheckboxMaps);
|
|
10883
|
+
const value = nodeids;
|
|
10884
|
+
changeEvent(evnt, value, node);
|
|
9802
10885
|
};
|
|
9803
|
-
const
|
|
9804
|
-
const {
|
|
9805
|
-
|
|
9806
|
-
|
|
10886
|
+
const handleNodeClickEvent = (evnt, node, chunks, chunkIndex) => {
|
|
10887
|
+
const { multiple } = props;
|
|
10888
|
+
const treeOpts = computeTreeOpts.value;
|
|
10889
|
+
const radioOpts = computeRadioOpts.value;
|
|
10890
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
10891
|
+
const childrenField = computeChildrenField.value;
|
|
10892
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
10893
|
+
const { transform, trigger } = treeOpts;
|
|
10894
|
+
const childList = node[transform ? mapChildrenField : childrenField];
|
|
10895
|
+
let triggerCurrent = false;
|
|
10896
|
+
let triggerRadio = false;
|
|
10897
|
+
let triggerCheckbox = false;
|
|
10898
|
+
let triggerExpand = false;
|
|
10899
|
+
triggerCurrent = true;
|
|
10900
|
+
changeCurrentEvent(evnt, node);
|
|
10901
|
+
if (trigger !== 'icon') {
|
|
10902
|
+
triggerExpand = true;
|
|
10903
|
+
toggleExpandEvent(evnt, node, chunks, chunkIndex);
|
|
9807
10904
|
}
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
10905
|
+
if (multiple) {
|
|
10906
|
+
if (checkboxOpts.trigger === 'node' || (!checkboxOpts.showIcon && (!childList || !childList.length))) {
|
|
10907
|
+
triggerCheckbox = true;
|
|
10908
|
+
changeCheckboxEvent(evnt, node);
|
|
10909
|
+
}
|
|
10910
|
+
}
|
|
10911
|
+
else {
|
|
10912
|
+
if (radioOpts.trigger === 'node' || (!radioOpts.showIcon && (!childList || !childList.length))) {
|
|
10913
|
+
triggerRadio = true;
|
|
10914
|
+
changeRadioEvent(evnt, node);
|
|
10915
|
+
}
|
|
9817
10916
|
}
|
|
10917
|
+
dispatchEvent('node-click', { node, triggerCurrent, triggerRadio, triggerCheckbox, triggerExpand }, evnt);
|
|
9818
10918
|
};
|
|
9819
10919
|
const focusEvent = (evnt) => {
|
|
9820
10920
|
const isDisabled = computeIsDisabled.value;
|
|
9821
10921
|
if (!isDisabled) {
|
|
9822
10922
|
if (!reactData.visiblePanel) {
|
|
9823
10923
|
reactData.triggerFocusPanel = true;
|
|
9824
|
-
showOptionPanel();
|
|
10924
|
+
showOptionPanel(evnt);
|
|
9825
10925
|
setTimeout(() => {
|
|
9826
10926
|
reactData.triggerFocusPanel = false;
|
|
9827
10927
|
}, 150);
|
|
@@ -9830,7 +10930,15 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9830
10930
|
dispatchEvent('focus', {}, evnt);
|
|
9831
10931
|
};
|
|
9832
10932
|
const clickEvent = (evnt) => {
|
|
9833
|
-
|
|
10933
|
+
evnt.preventDefault();
|
|
10934
|
+
if (reactData.triggerFocusPanel) {
|
|
10935
|
+
reactData.triggerFocusPanel = false;
|
|
10936
|
+
}
|
|
10937
|
+
else {
|
|
10938
|
+
if (!reactData.visiblePanel) {
|
|
10939
|
+
showOptionPanel(evnt);
|
|
10940
|
+
}
|
|
10941
|
+
}
|
|
9834
10942
|
dispatchEvent('click', {}, evnt);
|
|
9835
10943
|
};
|
|
9836
10944
|
const blurEvent = (evnt) => {
|
|
@@ -9839,12 +10947,13 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9839
10947
|
};
|
|
9840
10948
|
const modelSearchEvent = (value) => {
|
|
9841
10949
|
reactData.searchValue = value;
|
|
10950
|
+
triggerSearchEvent(new Event('filter'));
|
|
9842
10951
|
};
|
|
9843
10952
|
const handleSearchEvent = () => {
|
|
9844
|
-
const { modelValue, remote
|
|
10953
|
+
const { modelValue, remote } = props;
|
|
9845
10954
|
const { searchValue } = reactData;
|
|
9846
10955
|
const remoteOpts = computeRemoteOpts.value;
|
|
9847
|
-
const queryMethod = remoteOpts.queryMethod
|
|
10956
|
+
const queryMethod = remoteOpts.queryMethod;
|
|
9848
10957
|
if (remote && queryMethod && remoteOpts.enabled) {
|
|
9849
10958
|
reactData.searchLoading = true;
|
|
9850
10959
|
Promise.resolve(queryMethod({ $cascader: $xeCascader, searchValue, value: modelValue })).then(() => nextTick())
|
|
@@ -9862,18 +10971,211 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9862
10971
|
}
|
|
9863
10972
|
else {
|
|
9864
10973
|
if (reactData.visiblePanel) {
|
|
9865
|
-
hideOptionPanel();
|
|
10974
|
+
hideOptionPanel($event);
|
|
9866
10975
|
}
|
|
9867
10976
|
else {
|
|
9868
|
-
showOptionPanel();
|
|
10977
|
+
showOptionPanel($event);
|
|
10978
|
+
}
|
|
10979
|
+
}
|
|
10980
|
+
};
|
|
10981
|
+
const cascaderPrivateMethods = {
|
|
10982
|
+
isCheckedByCheckboxNodeId,
|
|
10983
|
+
/**
|
|
10984
|
+
* 用于树结构,给行数据加载子节点
|
|
10985
|
+
*/
|
|
10986
|
+
loadChildrenNode(node, childRecords) {
|
|
10987
|
+
const { separator } = props;
|
|
10988
|
+
const { nodeMaps } = internalData;
|
|
10989
|
+
const treeOpts = computeTreeOpts.value;
|
|
10990
|
+
const labelField = computeLabelField.value;
|
|
10991
|
+
const { lazy, transform } = treeOpts;
|
|
10992
|
+
if (!lazy) {
|
|
10993
|
+
return Promise.resolve([]);
|
|
9869
10994
|
}
|
|
10995
|
+
const childrenField = computeChildrenField.value;
|
|
10996
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
10997
|
+
const parentNodeItem = nodeMaps[getNodeId(node)];
|
|
10998
|
+
const parentLevel = parentNodeItem ? parentNodeItem.level : 0;
|
|
10999
|
+
const parentNodes = parentNodeItem ? parentNodeItem.nodes : [];
|
|
11000
|
+
return createNode(childRecords).then((nodeList) => {
|
|
11001
|
+
XEUtils.eachTree(nodeList, (childRow, index, items, path, parent, nodes) => {
|
|
11002
|
+
const itemNodeId = getNodeId(childRow);
|
|
11003
|
+
nodeMaps[itemNodeId] = {
|
|
11004
|
+
item: childRow,
|
|
11005
|
+
index: -1,
|
|
11006
|
+
$index: -1,
|
|
11007
|
+
_index: -1,
|
|
11008
|
+
items,
|
|
11009
|
+
parent: parent || parentNodeItem.item,
|
|
11010
|
+
nodes: parentNodes.concat(nodes),
|
|
11011
|
+
level: parentLevel + nodes.length,
|
|
11012
|
+
treeIndex: -1,
|
|
11013
|
+
lineCount: 0,
|
|
11014
|
+
treeLoaded: false,
|
|
11015
|
+
fullLabel: nodes.map(item => item[labelField]).join((separator || ' / '))
|
|
11016
|
+
};
|
|
11017
|
+
}, { children: childrenField });
|
|
11018
|
+
node[childrenField] = nodeList;
|
|
11019
|
+
if (transform) {
|
|
11020
|
+
node[mapChildrenField] = nodeList;
|
|
11021
|
+
}
|
|
11022
|
+
updateAfterDataIndex();
|
|
11023
|
+
return nodeList;
|
|
11024
|
+
});
|
|
9870
11025
|
}
|
|
9871
11026
|
};
|
|
9872
|
-
const cascaderPrivateMethods = {};
|
|
9873
11027
|
Object.assign($xeCascader, cascaderMethods, cascaderPrivateMethods);
|
|
11028
|
+
const handleVisibleOrCheckMode = (mode, isExistChild, nLevel) => {
|
|
11029
|
+
if (mode) {
|
|
11030
|
+
if (mode === 'first') {
|
|
11031
|
+
return !nLevel;
|
|
11032
|
+
}
|
|
11033
|
+
if (mode === 'last') {
|
|
11034
|
+
return !isExistChild;
|
|
11035
|
+
}
|
|
11036
|
+
}
|
|
11037
|
+
return true;
|
|
11038
|
+
};
|
|
11039
|
+
const renderRadio = (node, isExistChild, nLevel, isChecked) => {
|
|
11040
|
+
const radioOpts = computeRadioOpts.value;
|
|
11041
|
+
const { showIcon, checkMode, checkMethod, visibleMode, visibleMethod } = radioOpts;
|
|
11042
|
+
const isVisible = visibleMethod ? visibleMethod({ $cascader: $xeCascader, node }) : handleVisibleOrCheckMode(visibleMode, isExistChild, nLevel);
|
|
11043
|
+
if (showIcon && isVisible) {
|
|
11044
|
+
const isDisabled = checkMethod ? !checkMethod({ $cascader: $xeCascader, node }) : !handleVisibleOrCheckMode(checkMode, isExistChild, nLevel);
|
|
11045
|
+
return h('div', {
|
|
11046
|
+
class: ['vxe-tree--radio-option', {
|
|
11047
|
+
'is--checked': isChecked,
|
|
11048
|
+
'is--disabled': isDisabled
|
|
11049
|
+
}],
|
|
11050
|
+
onClick: (evnt) => {
|
|
11051
|
+
if (!isDisabled) {
|
|
11052
|
+
changeRadioEvent(evnt, node);
|
|
11053
|
+
}
|
|
11054
|
+
}
|
|
11055
|
+
}, [
|
|
11056
|
+
h('span', {
|
|
11057
|
+
class: ['vxe-radio--icon', isChecked ? getIcon$2().RADIO_CHECKED : getIcon$2().RADIO_UNCHECKED]
|
|
11058
|
+
})
|
|
11059
|
+
]);
|
|
11060
|
+
}
|
|
11061
|
+
return renderEmptyElement($xeCascader);
|
|
11062
|
+
};
|
|
11063
|
+
const renderCheckbox = (node, isExistChild, nLevel, isChecked, isIndeterminate) => {
|
|
11064
|
+
const checkboxOpts = computeCheckboxOpts.value;
|
|
11065
|
+
const { showIcon, checkMode, checkMethod, visibleMode, visibleMethod } = checkboxOpts;
|
|
11066
|
+
const isVisible = visibleMethod ? visibleMethod({ $cascader: $xeCascader, node }) : handleVisibleOrCheckMode(visibleMode, isExistChild, nLevel);
|
|
11067
|
+
if (showIcon && isVisible) {
|
|
11068
|
+
const isDisabled = checkMethod ? !checkMethod({ $cascader: $xeCascader, node }) : !handleVisibleOrCheckMode(checkMode, isExistChild, nLevel);
|
|
11069
|
+
return h('div', {
|
|
11070
|
+
class: ['vxe-cascader--checkbox-option', {
|
|
11071
|
+
'is--checked': isChecked,
|
|
11072
|
+
'is--indeterminate': isIndeterminate,
|
|
11073
|
+
'is--disabled': isDisabled
|
|
11074
|
+
}],
|
|
11075
|
+
onClick: (evnt) => {
|
|
11076
|
+
if (!isDisabled) {
|
|
11077
|
+
changeCheckboxEvent(evnt, node);
|
|
11078
|
+
}
|
|
11079
|
+
}
|
|
11080
|
+
}, [
|
|
11081
|
+
h('span', {
|
|
11082
|
+
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon$2().CHECKBOX_INDETERMINATE : (isChecked ? getIcon$2().CHECKBOX_CHECKED : getIcon$2().CHECKBOX_UNCHECKED)]
|
|
11083
|
+
})
|
|
11084
|
+
]);
|
|
11085
|
+
}
|
|
11086
|
+
return renderEmptyElement($xeCascader);
|
|
11087
|
+
};
|
|
11088
|
+
const renderNode = (node, nodeid, nodeIndex, chunks, chunkIndex) => {
|
|
11089
|
+
const { multiple } = props;
|
|
11090
|
+
const { currentNode, selectRadioKey, updateCheckboxFlag, updateExpandedFlag } = reactData;
|
|
11091
|
+
const { nodeMaps, selectCheckboxMaps, indeterminateRowMaps, treeExpandedMaps, treeExpandLazyLoadedMaps } = internalData;
|
|
11092
|
+
const treeOpts = computeTreeOpts.value;
|
|
11093
|
+
const { lazy, iconLoaded, iconOpen, iconClose } = treeOpts;
|
|
11094
|
+
const childrenField = computeChildrenField.value;
|
|
11095
|
+
const labelField = computeLabelField.value;
|
|
11096
|
+
const hasChildField = computeHasChildField.value;
|
|
11097
|
+
const childList = node[childrenField];
|
|
11098
|
+
const isExistChild = childList && childList.length > 0;
|
|
11099
|
+
const iconSlot = slots.icon;
|
|
11100
|
+
const titleSlot = slots.title;
|
|
11101
|
+
const isExpand = updateExpandedFlag && treeExpandedMaps[nodeid];
|
|
11102
|
+
const nodeItem = nodeMaps[nodeid] || {};
|
|
11103
|
+
const nodeTitle = node[labelField];
|
|
11104
|
+
const nLevel = nodeItem.level;
|
|
11105
|
+
let isRadioChecked = false;
|
|
11106
|
+
if (!multiple) {
|
|
11107
|
+
isRadioChecked = nodeid === selectRadioKey;
|
|
11108
|
+
}
|
|
11109
|
+
let isCheckboxChecked = false;
|
|
11110
|
+
let isIndeterminate = false;
|
|
11111
|
+
if (multiple) {
|
|
11112
|
+
isCheckboxChecked = !!(updateCheckboxFlag && selectCheckboxMaps[nodeid]);
|
|
11113
|
+
isIndeterminate = !!(updateCheckboxFlag && indeterminateRowMaps[nodeid]);
|
|
11114
|
+
}
|
|
11115
|
+
let hasLazyChilds = false;
|
|
11116
|
+
let isLazyLoading = false;
|
|
11117
|
+
let isLazyLoaded = false;
|
|
11118
|
+
if (lazy) {
|
|
11119
|
+
isLazyLoading = !!treeExpandLazyLoadedMaps[nodeid];
|
|
11120
|
+
hasLazyChilds = node[hasChildField];
|
|
11121
|
+
isLazyLoaded = !!nodeItem.treeLoaded;
|
|
11122
|
+
}
|
|
11123
|
+
const nParams = { node };
|
|
11124
|
+
return h('div', {
|
|
11125
|
+
key: `${chunkIndex}_${nodeIndex}`,
|
|
11126
|
+
class: ['vxe-cascader-chunk--node-item', {
|
|
11127
|
+
'is--current': currentNode && (currentNode === node || getNodeId(currentNode) === nodeid),
|
|
11128
|
+
'is-radio--checked': isRadioChecked,
|
|
11129
|
+
'is-checkbox--checked': isCheckboxChecked,
|
|
11130
|
+
'is-checkbox--indeterminate': isIndeterminate,
|
|
11131
|
+
'is--expand': isExpand
|
|
11132
|
+
}],
|
|
11133
|
+
title: nodeTitle,
|
|
11134
|
+
onMousedown: (evnt) => {
|
|
11135
|
+
const isLeftBtn = evnt.button === 0;
|
|
11136
|
+
if (isLeftBtn) {
|
|
11137
|
+
evnt.stopPropagation();
|
|
11138
|
+
}
|
|
11139
|
+
},
|
|
11140
|
+
onClick(evnt) {
|
|
11141
|
+
handleNodeClickEvent(evnt, node, chunks, chunkIndex);
|
|
11142
|
+
}
|
|
11143
|
+
}, [
|
|
11144
|
+
multiple ? renderCheckbox(node, isExistChild, nLevel, isCheckboxChecked, isIndeterminate) : renderRadio(node, isExistChild, nLevel, isRadioChecked),
|
|
11145
|
+
h('div', {
|
|
11146
|
+
class: 'vxe-cascader-chunk--node-item-inner'
|
|
11147
|
+
}, [
|
|
11148
|
+
h('div', {
|
|
11149
|
+
class: 'vxe-cascader-chunk--node-item-title'
|
|
11150
|
+
}, titleSlot ? getSlotVNs$1(titleSlot(nParams)) : nodeTitle)
|
|
11151
|
+
]),
|
|
11152
|
+
treeOpts.showIcon && (lazy ? (isLazyLoaded ? isExistChild : hasLazyChilds) : isExistChild)
|
|
11153
|
+
? h('div', {
|
|
11154
|
+
class: 'vxe-cascader-chunk--node-item-switcher'
|
|
11155
|
+
}, [
|
|
11156
|
+
[
|
|
11157
|
+
h('div', {
|
|
11158
|
+
class: 'vxe-cascader--node-item-icon',
|
|
11159
|
+
onClick(evnt) {
|
|
11160
|
+
if (treeOpts.trigger === 'icon') {
|
|
11161
|
+
toggleExpandEvent(evnt, node, chunks, chunkIndex);
|
|
11162
|
+
}
|
|
11163
|
+
}
|
|
11164
|
+
}, iconSlot
|
|
11165
|
+
? getSlotVNs$1(iconSlot(nParams))
|
|
11166
|
+
: [
|
|
11167
|
+
h('i', {
|
|
11168
|
+
class: isLazyLoading ? (iconLoaded || getIcon$2().CASCADER_NODE_LOADED) : (isExpand ? (iconOpen || getIcon$2().CASCADER_NODE_OPEN) : (iconClose || getIcon$2().CASCADER_NODE_CLOSE))
|
|
11169
|
+
})
|
|
11170
|
+
])
|
|
11171
|
+
]
|
|
11172
|
+
])
|
|
11173
|
+
: renderEmptyElement($xeCascader)
|
|
11174
|
+
]);
|
|
11175
|
+
};
|
|
9874
11176
|
const renderVN = () => {
|
|
9875
|
-
const { className, modelValue, multiple, loading, filterable, showTotalButton, showCheckedButton, showClearButton } = props;
|
|
9876
|
-
const { initialized, isActivated, isAniVisible, visiblePanel, searchValue } = reactData;
|
|
11177
|
+
const { className, modelValue, multiple, loading, filterable, showTotalButton, showCheckedButton, showClearButton, showCloseButton } = props;
|
|
11178
|
+
const { initialized, isActivated, isAniVisible, visiblePanel, searchValue, currentCunkList } = reactData;
|
|
9877
11179
|
const vSize = computeSize.value;
|
|
9878
11180
|
const isDisabled = computeIsDisabled.value;
|
|
9879
11181
|
const selectLabel = computeSelectLabel.value;
|
|
@@ -9941,7 +11243,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9941
11243
|
'ani--enter': !loading && visiblePanel
|
|
9942
11244
|
}],
|
|
9943
11245
|
placement: reactData.panelPlacement,
|
|
9944
|
-
style:
|
|
11246
|
+
style: popupWrapperStyle
|
|
9945
11247
|
}, initialized
|
|
9946
11248
|
? [
|
|
9947
11249
|
h('div', {
|
|
@@ -9964,38 +11266,35 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9964
11266
|
})
|
|
9965
11267
|
])
|
|
9966
11268
|
: renderEmptyElement($xeCascader),
|
|
9967
|
-
|
|
11269
|
+
(showCheckedButton && multiple) || showClearButton || headerSlot
|
|
9968
11270
|
? h('div', {
|
|
9969
|
-
class: 'vxe-
|
|
11271
|
+
class: 'vxe-tree-select--panel-header'
|
|
9970
11272
|
}, headerSlot
|
|
9971
11273
|
? headerSlot({})
|
|
9972
11274
|
: [
|
|
9973
11275
|
h('div', {
|
|
9974
|
-
class: 'vxe-
|
|
11276
|
+
class: 'vxe-tree-select--header-button'
|
|
9975
11277
|
}, [
|
|
9976
|
-
|
|
11278
|
+
showCheckedButton && showClearButton
|
|
9977
11279
|
? h('div', {
|
|
9978
|
-
class: 'vxe-
|
|
9979
|
-
},
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
|
|
9991
|
-
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
})
|
|
9997
|
-
: renderEmptyElement($xeCascader)
|
|
9998
|
-
])
|
|
11280
|
+
class: 'vxe-tree-select--selected-btns'
|
|
11281
|
+
}, [
|
|
11282
|
+
(showCheckedButton && multiple)
|
|
11283
|
+
? h(VxeButtonComponent, {
|
|
11284
|
+
content: getI18n$2('vxe.treeSelect.allChecked'),
|
|
11285
|
+
mode: 'text',
|
|
11286
|
+
onClick: allCheckedPanelEvent
|
|
11287
|
+
})
|
|
11288
|
+
: renderEmptyElement($xeCascader),
|
|
11289
|
+
showClearButton
|
|
11290
|
+
? h(VxeButtonComponent, {
|
|
11291
|
+
content: getI18n$2('vxe.treeSelect.clearChecked'),
|
|
11292
|
+
mode: 'text',
|
|
11293
|
+
onClick: clearCheckedPanelEvent
|
|
11294
|
+
})
|
|
11295
|
+
: renderEmptyElement($xeCascader)
|
|
11296
|
+
])
|
|
11297
|
+
: renderEmptyElement($xeCascader)
|
|
9999
11298
|
])
|
|
10000
11299
|
])
|
|
10001
11300
|
: renderEmptyElement($xeCascader),
|
|
@@ -10003,15 +11302,56 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
10003
11302
|
class: 'vxe-cascader--panel-body'
|
|
10004
11303
|
}, [
|
|
10005
11304
|
h('div', {
|
|
10006
|
-
ref:
|
|
10007
|
-
class: 'vxe-cascader-
|
|
10008
|
-
|
|
10009
|
-
|
|
11305
|
+
ref: refChunkWrapper,
|
|
11306
|
+
class: 'vxe-cascader-chunk--wrapper'
|
|
11307
|
+
}, [
|
|
11308
|
+
currentCunkList.map((chunks, chunkIndex) => {
|
|
11309
|
+
return h('div', {
|
|
11310
|
+
key: chunkIndex,
|
|
11311
|
+
class: 'vxe-cascader-chunk--item-wrapper'
|
|
11312
|
+
}, [
|
|
11313
|
+
h(VxeListComponent, {
|
|
11314
|
+
data: chunks
|
|
11315
|
+
}, {
|
|
11316
|
+
default(slotParams) {
|
|
11317
|
+
const { items } = slotParams;
|
|
11318
|
+
return items.map((node, nodeIndex) => {
|
|
11319
|
+
const nodeid = getNodeId(node);
|
|
11320
|
+
return renderNode(node, nodeid, nodeIndex, chunks, chunkIndex);
|
|
11321
|
+
});
|
|
11322
|
+
}
|
|
11323
|
+
})
|
|
11324
|
+
]);
|
|
11325
|
+
})
|
|
11326
|
+
])
|
|
10010
11327
|
]),
|
|
10011
|
-
footerSlot
|
|
11328
|
+
footerSlot || showTotalButton || (showCloseButton && multiple)
|
|
10012
11329
|
? h('div', {
|
|
10013
11330
|
class: 'vxe-cascader--panel-footer'
|
|
10014
|
-
}, footerSlot
|
|
11331
|
+
}, footerSlot
|
|
11332
|
+
? footerSlot({})
|
|
11333
|
+
: [
|
|
11334
|
+
h('div', {
|
|
11335
|
+
class: 'vxe-cascader--footer-button'
|
|
11336
|
+
}, [
|
|
11337
|
+
showTotalButton
|
|
11338
|
+
? h('div', {
|
|
11339
|
+
class: 'vxe-cascader--total-btns'
|
|
11340
|
+
}, getI18n$2('vxe.treeSelect.total', [selectVals.length]))
|
|
11341
|
+
: renderEmptyElement($xeCascader),
|
|
11342
|
+
showCloseButton && multiple
|
|
11343
|
+
? h('div', {
|
|
11344
|
+
class: 'vxe-cascader--oper-btns'
|
|
11345
|
+
}, [
|
|
11346
|
+
h(VxeButtonComponent, {
|
|
11347
|
+
content: getI18n$2('vxe.select.close'),
|
|
11348
|
+
mode: 'text',
|
|
11349
|
+
onClick: closePanelEvent
|
|
11350
|
+
})
|
|
11351
|
+
])
|
|
11352
|
+
: renderEmptyElement($xeCascader)
|
|
11353
|
+
])
|
|
11354
|
+
])
|
|
10015
11355
|
: renderEmptyElement($xeCascader)
|
|
10016
11356
|
])
|
|
10017
11357
|
]
|
|
@@ -10019,11 +11359,30 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
10019
11359
|
])
|
|
10020
11360
|
]);
|
|
10021
11361
|
};
|
|
11362
|
+
watch(() => props.modelValue, () => {
|
|
11363
|
+
if (!reactData.visiblePanel) {
|
|
11364
|
+
handleCurrentItems();
|
|
11365
|
+
updateCurrentChunk();
|
|
11366
|
+
}
|
|
11367
|
+
});
|
|
10022
11368
|
watch(() => props.options, () => {
|
|
10023
|
-
|
|
11369
|
+
cacheNodeMap();
|
|
10024
11370
|
});
|
|
10025
|
-
|
|
11371
|
+
const dataFlag = ref(0);
|
|
11372
|
+
watch(() => props.options ? props.options.length : 0, () => {
|
|
11373
|
+
dataFlag.value++;
|
|
11374
|
+
});
|
|
11375
|
+
watch(() => props.options, () => {
|
|
11376
|
+
dataFlag.value++;
|
|
11377
|
+
});
|
|
11378
|
+
watch(dataFlag, () => {
|
|
11379
|
+
loadData(props.options || []);
|
|
11380
|
+
});
|
|
11381
|
+
loadData(props.options || []);
|
|
10026
11382
|
onMounted(() => {
|
|
11383
|
+
if (props.filterable) {
|
|
11384
|
+
errLog('vxe.error.notProp', ['filterable']);
|
|
11385
|
+
}
|
|
10027
11386
|
globalEvents.on($xeCascader, 'mousewheel', handleGlobalMousewheelEvent);
|
|
10028
11387
|
globalEvents.on($xeCascader, 'mousedown', handleGlobalMousedownEvent);
|
|
10029
11388
|
globalEvents.on($xeCascader, 'blur', handleGlobalBlurEvent);
|
|
@@ -10034,7 +11393,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
10034
11393
|
globalEvents.off($xeCascader, 'mousedown');
|
|
10035
11394
|
globalEvents.off($xeCascader, 'blur');
|
|
10036
11395
|
globalEvents.off($xeCascader, 'resize');
|
|
10037
|
-
XEUtils.assign(internalData, createInternalData$
|
|
11396
|
+
XEUtils.assign(internalData, createInternalData$b());
|
|
10038
11397
|
});
|
|
10039
11398
|
provide('$xeCascader', $xeCascader);
|
|
10040
11399
|
$xeCascader.renderVN = renderVN;
|
|
@@ -10367,7 +11726,7 @@ dynamicApp.use(VxeCheckboxButton);
|
|
|
10367
11726
|
VxeUI.component(VxeCheckboxButtonComponent);
|
|
10368
11727
|
const CheckboxButton = VxeCheckboxButton;
|
|
10369
11728
|
|
|
10370
|
-
function createInternalData$
|
|
11729
|
+
function createInternalData$a() {
|
|
10371
11730
|
return {
|
|
10372
11731
|
// isLoaded: false
|
|
10373
11732
|
};
|
|
@@ -10407,7 +11766,7 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
10407
11766
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
10408
11767
|
const xID = XEUtils.uniqueId();
|
|
10409
11768
|
const reactData = reactive({});
|
|
10410
|
-
const internalData = createInternalData$
|
|
11769
|
+
const internalData = createInternalData$a();
|
|
10411
11770
|
const computeIsReadonly = computed(() => {
|
|
10412
11771
|
const { readonly } = props;
|
|
10413
11772
|
if (readonly === null) {
|
|
@@ -10566,7 +11925,7 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
10566
11925
|
});
|
|
10567
11926
|
});
|
|
10568
11927
|
onUnmounted(() => {
|
|
10569
|
-
XEUtils.assign(internalData, createInternalData$
|
|
11928
|
+
XEUtils.assign(internalData, createInternalData$a());
|
|
10570
11929
|
});
|
|
10571
11930
|
provide('$xeCheckboxGroup', $xeCheckboxGroup);
|
|
10572
11931
|
$xeCheckboxGroup.renderVN = renderVN;
|
|
@@ -11308,6 +12667,11 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
11308
12667
|
},
|
|
11309
12668
|
controlConfig: Object,
|
|
11310
12669
|
// float
|
|
12670
|
+
roundingMode: {
|
|
12671
|
+
type: String,
|
|
12672
|
+
default: () => getConfig$3().numberInput.roundingMode
|
|
12673
|
+
},
|
|
12674
|
+
// float
|
|
11311
12675
|
digits: {
|
|
11312
12676
|
type: [String, Number],
|
|
11313
12677
|
default: null
|
|
@@ -11477,12 +12841,22 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
11477
12841
|
return type === 'integer' ? XEUtils.toInteger(handleNumber(inputValue)) : XEUtils.toNumber(handleNumber(inputValue));
|
|
11478
12842
|
});
|
|
11479
12843
|
const computeNumLabel = computed(() => {
|
|
11480
|
-
const { type, showCurrency, currencySymbol, autoFill } = props;
|
|
12844
|
+
const { type, roundingMode, showCurrency, currencySymbol, autoFill } = props;
|
|
11481
12845
|
const { inputValue } = reactData;
|
|
11482
12846
|
const digitsValue = computeDigitsValue.value;
|
|
11483
12847
|
if (type === 'amount') {
|
|
11484
12848
|
const num = XEUtils.toNumber(inputValue);
|
|
11485
|
-
|
|
12849
|
+
const cfyOpts = { digits: digitsValue };
|
|
12850
|
+
if (roundingMode === 'floor') {
|
|
12851
|
+
cfyOpts.floor = true;
|
|
12852
|
+
}
|
|
12853
|
+
else if (roundingMode === 'ceil') {
|
|
12854
|
+
cfyOpts.ceil = true;
|
|
12855
|
+
}
|
|
12856
|
+
else {
|
|
12857
|
+
cfyOpts.round = true;
|
|
12858
|
+
}
|
|
12859
|
+
let amountLabel = XEUtils.commafy(num, cfyOpts);
|
|
11486
12860
|
if (!autoFill) {
|
|
11487
12861
|
const [iStr, dStr] = amountLabel.split('.');
|
|
11488
12862
|
if (dStr) {
|
|
@@ -11541,13 +12915,13 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
11541
12915
|
return `${val}`;
|
|
11542
12916
|
};
|
|
11543
12917
|
const getNumberValue = (val) => {
|
|
11544
|
-
const { exponential, autoFill } = props;
|
|
12918
|
+
const { type, exponential, roundingMode, autoFill } = props;
|
|
11545
12919
|
const inpMaxLength = computeInpMaxLength.value;
|
|
11546
12920
|
const digitsValue = computeDigitsValue.value;
|
|
11547
12921
|
const decimalsType = computeDecimalsType.value;
|
|
11548
12922
|
let restVal = '';
|
|
11549
12923
|
if (decimalsType) {
|
|
11550
|
-
restVal = toFloatValueFixed(val, digitsValue);
|
|
12924
|
+
restVal = toFloatValueFixed(val, type, digitsValue, roundingMode);
|
|
11551
12925
|
if (!autoFill) {
|
|
11552
12926
|
restVal = handleNumberString(XEUtils.toNumber(restVal));
|
|
11553
12927
|
}
|
|
@@ -11639,7 +13013,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
11639
13013
|
}
|
|
11640
13014
|
};
|
|
11641
13015
|
const updateModel = (val) => {
|
|
11642
|
-
const { autoFill } = props;
|
|
13016
|
+
const { type, roundingMode, autoFill } = props;
|
|
11643
13017
|
const { inputValue } = reactData;
|
|
11644
13018
|
const digitsValue = computeDigitsValue.value;
|
|
11645
13019
|
const decimalsType = computeDecimalsType.value;
|
|
@@ -11647,11 +13021,11 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
11647
13021
|
reactData.inputValue = '';
|
|
11648
13022
|
}
|
|
11649
13023
|
else {
|
|
11650
|
-
let textValue =
|
|
13024
|
+
let textValue = '' + val;
|
|
11651
13025
|
if (decimalsType) {
|
|
11652
|
-
textValue = toFloatValueFixed(val, digitsValue);
|
|
13026
|
+
textValue = toFloatValueFixed(val, type, digitsValue, roundingMode);
|
|
11653
13027
|
if (!autoFill) {
|
|
11654
|
-
textValue =
|
|
13028
|
+
textValue = '' + XEUtils.toNumber(textValue);
|
|
11655
13029
|
}
|
|
11656
13030
|
}
|
|
11657
13031
|
if (textValue !== inputValue) {
|
|
@@ -11663,7 +13037,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
11663
13037
|
* 检查初始值
|
|
11664
13038
|
*/
|
|
11665
13039
|
const initValue = () => {
|
|
11666
|
-
const { autoFill } = props;
|
|
13040
|
+
const { type, roundingMode, autoFill } = props;
|
|
11667
13041
|
const { inputValue } = reactData;
|
|
11668
13042
|
const digitsValue = computeDigitsValue.value;
|
|
11669
13043
|
const decimalsType = computeDecimalsType.value;
|
|
@@ -11672,7 +13046,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
11672
13046
|
let textValue = '';
|
|
11673
13047
|
let validValue = null;
|
|
11674
13048
|
if (inputValue) {
|
|
11675
|
-
textValue = toFloatValueFixed(inputValue, digitsValue);
|
|
13049
|
+
textValue = toFloatValueFixed(inputValue, type, digitsValue, roundingMode);
|
|
11676
13050
|
validValue = XEUtils.toNumber(textValue);
|
|
11677
13051
|
if (!autoFill) {
|
|
11678
13052
|
textValue = `${validValue}`;
|
|
@@ -13294,12 +14668,12 @@ dynamicApp.use(VxeColorPicker);
|
|
|
13294
14668
|
VxeUI.component(VxeColorPickerComponent);
|
|
13295
14669
|
const ColorPicker = VxeColorPicker;
|
|
13296
14670
|
|
|
13297
|
-
function createInternalData$
|
|
14671
|
+
function createInternalData$9() {
|
|
13298
14672
|
return {
|
|
13299
14673
|
// leaveTime: null
|
|
13300
14674
|
};
|
|
13301
14675
|
}
|
|
13302
|
-
function createReactData$
|
|
14676
|
+
function createReactData$7() {
|
|
13303
14677
|
return {
|
|
13304
14678
|
visible: false,
|
|
13305
14679
|
activeOption: null,
|
|
@@ -13354,8 +14728,8 @@ var VxeContextMenuComponent = defineVxeComponent({
|
|
|
13354
14728
|
const xID = XEUtils.uniqueId();
|
|
13355
14729
|
const refElem = ref();
|
|
13356
14730
|
const { computeSize } = useSize(props);
|
|
13357
|
-
const internalData = createInternalData$
|
|
13358
|
-
const reactData = reactive(createReactData$
|
|
14731
|
+
const internalData = createInternalData$9();
|
|
14732
|
+
const reactData = reactive(createReactData$7());
|
|
13359
14733
|
const refMaps = {
|
|
13360
14734
|
refElem
|
|
13361
14735
|
};
|
|
@@ -13910,8 +15284,8 @@ var VxeContextMenuComponent = defineVxeComponent({
|
|
|
13910
15284
|
globalEvents.off($xeContextMenu, 'keydown');
|
|
13911
15285
|
globalEvents.off($xeContextMenu, 'mousedown');
|
|
13912
15286
|
globalEvents.off($xeContextMenu, 'blur');
|
|
13913
|
-
XEUtils.assign(reactData, createReactData$
|
|
13914
|
-
XEUtils.assign(internalData, createInternalData$
|
|
15287
|
+
XEUtils.assign(reactData, createReactData$7());
|
|
15288
|
+
XEUtils.assign(internalData, createInternalData$9());
|
|
13915
15289
|
});
|
|
13916
15290
|
$xeContextMenu.renderVN = renderVN;
|
|
13917
15291
|
return $xeContextMenu;
|
|
@@ -20601,7 +21975,7 @@ function checkRuleStatus(rule, data, val) {
|
|
|
20601
21975
|
}
|
|
20602
21976
|
return true;
|
|
20603
21977
|
}
|
|
20604
|
-
function createReactData$
|
|
21978
|
+
function createReactData$6() {
|
|
20605
21979
|
return {
|
|
20606
21980
|
collapseAll: false,
|
|
20607
21981
|
staticItems: [],
|
|
@@ -20609,7 +21983,7 @@ function createReactData$7() {
|
|
|
20609
21983
|
itemWidth: 0
|
|
20610
21984
|
};
|
|
20611
21985
|
}
|
|
20612
|
-
function createInternalData$
|
|
21986
|
+
function createInternalData$8() {
|
|
20613
21987
|
return {
|
|
20614
21988
|
meTimeout: undefined,
|
|
20615
21989
|
stTimeout: undefined,
|
|
@@ -20718,8 +22092,8 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
20718
22092
|
const $xeGrid = inject('$xeGrid', null);
|
|
20719
22093
|
const xID = XEUtils.uniqueId();
|
|
20720
22094
|
const { computeSize } = useSize(props);
|
|
20721
|
-
const reactData = reactive(createReactData$
|
|
20722
|
-
const internalData = createInternalData$
|
|
22095
|
+
const reactData = reactive(createReactData$6());
|
|
22096
|
+
const internalData = createInternalData$8();
|
|
20723
22097
|
const refElem = ref();
|
|
20724
22098
|
const refTooltip = ref();
|
|
20725
22099
|
let formMethods = {};
|
|
@@ -21413,7 +22787,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
21413
22787
|
});
|
|
21414
22788
|
onUnmounted(() => {
|
|
21415
22789
|
globalEvents.off($xeForm, 'resize');
|
|
21416
|
-
XEUtils.assign(internalData, createInternalData$
|
|
22790
|
+
XEUtils.assign(internalData, createInternalData$8());
|
|
21417
22791
|
});
|
|
21418
22792
|
reactData.collapseAll = !!props.collapseStatus;
|
|
21419
22793
|
if (props.items) {
|
|
@@ -22817,13 +24191,13 @@ const openPreviewImage = (options) => {
|
|
|
22817
24191
|
return Promise.resolve();
|
|
22818
24192
|
};
|
|
22819
24193
|
|
|
22820
|
-
function createInternalData$
|
|
24194
|
+
function createInternalData$7() {
|
|
22821
24195
|
return {
|
|
22822
24196
|
// dgTime: 0,
|
|
22823
24197
|
// mdTime: 0
|
|
22824
24198
|
};
|
|
22825
24199
|
}
|
|
22826
|
-
function createReactData$
|
|
24200
|
+
function createReactData$5() {
|
|
22827
24201
|
return {};
|
|
22828
24202
|
}
|
|
22829
24203
|
var VxeImageComponent = defineVxeComponent({
|
|
@@ -22882,8 +24256,8 @@ var VxeImageComponent = defineVxeComponent({
|
|
|
22882
24256
|
const $xeImageGroup = inject('$xeImageGroup', null);
|
|
22883
24257
|
const refElem = ref();
|
|
22884
24258
|
const { computeSize } = useSize(props);
|
|
22885
|
-
const internalData = createInternalData$
|
|
22886
|
-
const reactData = reactive(createReactData$
|
|
24259
|
+
const internalData = createInternalData$7();
|
|
24260
|
+
const reactData = reactive(createReactData$5());
|
|
22887
24261
|
const refMaps = {
|
|
22888
24262
|
refElem
|
|
22889
24263
|
};
|
|
@@ -23069,8 +24443,8 @@ var VxeImageComponent = defineVxeComponent({
|
|
|
23069
24443
|
]);
|
|
23070
24444
|
};
|
|
23071
24445
|
onBeforeUnmount(() => {
|
|
23072
|
-
XEUtils.assign(reactData, createReactData$
|
|
23073
|
-
XEUtils.assign(internalData, createInternalData$
|
|
24446
|
+
XEUtils.assign(reactData, createReactData$5());
|
|
24447
|
+
XEUtils.assign(internalData, createInternalData$7());
|
|
23074
24448
|
});
|
|
23075
24449
|
$xeImage.renderVN = renderVN;
|
|
23076
24450
|
return $xeImage;
|
|
@@ -23359,10 +24733,10 @@ dynamicApp.use(VxeLayoutAside);
|
|
|
23359
24733
|
VxeUI.component(VxeLayoutAsideComponent);
|
|
23360
24734
|
const LayoutAside = VxeLayoutAside;
|
|
23361
24735
|
|
|
23362
|
-
function createInternalData$
|
|
24736
|
+
function createInternalData$6() {
|
|
23363
24737
|
return {};
|
|
23364
24738
|
}
|
|
23365
|
-
function createReactData$
|
|
24739
|
+
function createReactData$4() {
|
|
23366
24740
|
return {};
|
|
23367
24741
|
}
|
|
23368
24742
|
var VxeLayoutBodyComponent = defineVxeComponent({
|
|
@@ -23387,8 +24761,8 @@ var VxeLayoutBodyComponent = defineVxeComponent({
|
|
|
23387
24761
|
const backtopId = `vxe_layout_body_backtop_${xID}`;
|
|
23388
24762
|
const refElem = ref();
|
|
23389
24763
|
const { computeSize } = useSize(props);
|
|
23390
|
-
const internalData = createInternalData$
|
|
23391
|
-
const reactData = reactive(createReactData$
|
|
24764
|
+
const internalData = createInternalData$6();
|
|
24765
|
+
const reactData = reactive(createReactData$4());
|
|
23392
24766
|
const refMaps = {
|
|
23393
24767
|
refElem
|
|
23394
24768
|
};
|
|
@@ -23803,404 +25177,6 @@ dynamicApp.use(VxeLink);
|
|
|
23803
25177
|
VxeUI.component(VxeLinkComponent);
|
|
23804
25178
|
const Link = VxeLink;
|
|
23805
25179
|
|
|
23806
|
-
function createReactData$4() {
|
|
23807
|
-
return {
|
|
23808
|
-
scrollYLoad: false,
|
|
23809
|
-
bodyHeight: 0,
|
|
23810
|
-
customHeight: 0,
|
|
23811
|
-
customMaxHeight: 0,
|
|
23812
|
-
parentHeight: 0,
|
|
23813
|
-
topSpaceHeight: 0,
|
|
23814
|
-
items: []
|
|
23815
|
-
};
|
|
23816
|
-
}
|
|
23817
|
-
function createInternalData$6() {
|
|
23818
|
-
return {
|
|
23819
|
-
resizeObserver: undefined,
|
|
23820
|
-
fullData: [],
|
|
23821
|
-
lastScrollLeft: 0,
|
|
23822
|
-
lastScrollTop: 0,
|
|
23823
|
-
scrollYStore: {
|
|
23824
|
-
startIndex: 0,
|
|
23825
|
-
endIndex: 0,
|
|
23826
|
-
visibleSize: 0,
|
|
23827
|
-
offsetSize: 0,
|
|
23828
|
-
rowHeight: 0
|
|
23829
|
-
}
|
|
23830
|
-
};
|
|
23831
|
-
}
|
|
23832
|
-
var VxeListComponent = defineVxeComponent({
|
|
23833
|
-
name: 'VxeList',
|
|
23834
|
-
props: {
|
|
23835
|
-
data: Array,
|
|
23836
|
-
height: [Number, String],
|
|
23837
|
-
maxHeight: [Number, String],
|
|
23838
|
-
loading: Boolean,
|
|
23839
|
-
className: [String, Function],
|
|
23840
|
-
size: {
|
|
23841
|
-
type: String,
|
|
23842
|
-
default: () => getConfig$3().list.size || getConfig$3().size
|
|
23843
|
-
},
|
|
23844
|
-
autoResize: {
|
|
23845
|
-
type: Boolean,
|
|
23846
|
-
default: () => getConfig$3().list.autoResize
|
|
23847
|
-
},
|
|
23848
|
-
syncResize: [Boolean, String, Number],
|
|
23849
|
-
virtualYConfig: Object,
|
|
23850
|
-
scrollY: Object
|
|
23851
|
-
},
|
|
23852
|
-
emits: [
|
|
23853
|
-
'scroll'
|
|
23854
|
-
],
|
|
23855
|
-
setup(props, context) {
|
|
23856
|
-
const { slots, emit } = context;
|
|
23857
|
-
const xID = XEUtils.uniqueId();
|
|
23858
|
-
const browseObj = XEUtils.browse();
|
|
23859
|
-
const { computeSize } = useSize(props);
|
|
23860
|
-
const reactData = reactive(createReactData$4());
|
|
23861
|
-
const internalData = createInternalData$6();
|
|
23862
|
-
const refElem = ref();
|
|
23863
|
-
const refVirtualWrapper = ref();
|
|
23864
|
-
const refVirtualBody = ref();
|
|
23865
|
-
const refMaps = {
|
|
23866
|
-
refElem
|
|
23867
|
-
};
|
|
23868
|
-
const $xeList = {
|
|
23869
|
-
xID,
|
|
23870
|
-
props,
|
|
23871
|
-
context,
|
|
23872
|
-
reactData,
|
|
23873
|
-
internalData,
|
|
23874
|
-
getRefMaps: () => refMaps
|
|
23875
|
-
};
|
|
23876
|
-
const computeSYOpts = computed(() => {
|
|
23877
|
-
return Object.assign({}, getConfig$3().list.virtualYConfig || getConfig$3().list.scrollY, props.virtualYConfig || props.scrollY);
|
|
23878
|
-
});
|
|
23879
|
-
const computeStyles = computed(() => {
|
|
23880
|
-
const { height, maxHeight } = props;
|
|
23881
|
-
const { customHeight, customMaxHeight } = reactData;
|
|
23882
|
-
const style = {};
|
|
23883
|
-
if (height) {
|
|
23884
|
-
style.height = `${customHeight}px`;
|
|
23885
|
-
}
|
|
23886
|
-
else if (maxHeight) {
|
|
23887
|
-
style.height = 'auto';
|
|
23888
|
-
style.maxHeight = `${customMaxHeight}px`;
|
|
23889
|
-
}
|
|
23890
|
-
return style;
|
|
23891
|
-
});
|
|
23892
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
23893
|
-
emit(type, createEvent(evnt, { $list: $xeList }, params));
|
|
23894
|
-
};
|
|
23895
|
-
const calcTableHeight = (key) => {
|
|
23896
|
-
const { parentHeight } = reactData;
|
|
23897
|
-
const val = props[key];
|
|
23898
|
-
let num = 0;
|
|
23899
|
-
if (val) {
|
|
23900
|
-
if (val === '100%' || val === 'auto') {
|
|
23901
|
-
num = parentHeight;
|
|
23902
|
-
}
|
|
23903
|
-
else {
|
|
23904
|
-
if (isScale(val)) {
|
|
23905
|
-
num = Math.floor((XEUtils.toInteger(val) || 1) / 100 * parentHeight);
|
|
23906
|
-
}
|
|
23907
|
-
else {
|
|
23908
|
-
num = XEUtils.toNumber(val);
|
|
23909
|
-
}
|
|
23910
|
-
num = Math.max(40, num);
|
|
23911
|
-
}
|
|
23912
|
-
}
|
|
23913
|
-
return num;
|
|
23914
|
-
};
|
|
23915
|
-
const updateHeight = () => {
|
|
23916
|
-
reactData.customHeight = calcTableHeight('height');
|
|
23917
|
-
reactData.customMaxHeight = calcTableHeight('maxHeight');
|
|
23918
|
-
};
|
|
23919
|
-
const updateYSpace = () => {
|
|
23920
|
-
const { scrollYLoad } = reactData;
|
|
23921
|
-
const { scrollYStore, fullData } = internalData;
|
|
23922
|
-
reactData.bodyHeight = scrollYLoad ? fullData.length * scrollYStore.rowHeight : 0;
|
|
23923
|
-
reactData.topSpaceHeight = scrollYLoad ? Math.max(scrollYStore.startIndex * scrollYStore.rowHeight, 0) : 0;
|
|
23924
|
-
};
|
|
23925
|
-
const handleData = () => {
|
|
23926
|
-
const { scrollYLoad } = reactData;
|
|
23927
|
-
const { fullData, scrollYStore } = internalData;
|
|
23928
|
-
reactData.items = scrollYLoad ? fullData.slice(scrollYStore.startIndex, scrollYStore.endIndex) : fullData.slice(0);
|
|
23929
|
-
return nextTick();
|
|
23930
|
-
};
|
|
23931
|
-
const updateYData = () => {
|
|
23932
|
-
handleData();
|
|
23933
|
-
updateYSpace();
|
|
23934
|
-
};
|
|
23935
|
-
const computeScrollLoad = () => {
|
|
23936
|
-
return nextTick().then(() => {
|
|
23937
|
-
const { scrollYLoad } = reactData;
|
|
23938
|
-
const { scrollYStore } = internalData;
|
|
23939
|
-
const virtualBodyElem = refVirtualBody.value;
|
|
23940
|
-
const sYOpts = computeSYOpts.value;
|
|
23941
|
-
let rowHeight = 0;
|
|
23942
|
-
let firstItemElem;
|
|
23943
|
-
if (virtualBodyElem) {
|
|
23944
|
-
if (sYOpts.sItem) {
|
|
23945
|
-
firstItemElem = virtualBodyElem.querySelector(sYOpts.sItem);
|
|
23946
|
-
}
|
|
23947
|
-
if (!firstItemElem) {
|
|
23948
|
-
firstItemElem = virtualBodyElem.children[0];
|
|
23949
|
-
}
|
|
23950
|
-
}
|
|
23951
|
-
if (firstItemElem) {
|
|
23952
|
-
rowHeight = firstItemElem.offsetHeight;
|
|
23953
|
-
}
|
|
23954
|
-
rowHeight = Math.max(12, rowHeight);
|
|
23955
|
-
scrollYStore.rowHeight = rowHeight;
|
|
23956
|
-
// 计算 Y 逻辑
|
|
23957
|
-
if (scrollYLoad) {
|
|
23958
|
-
const scrollBodyElem = refVirtualWrapper.value;
|
|
23959
|
-
const visibleYSize = Math.max(8, Math.ceil(scrollBodyElem.clientHeight / rowHeight));
|
|
23960
|
-
const offsetYSize = sYOpts.oSize ? XEUtils.toNumber(sYOpts.oSize) : (browseObj.edge ? 10 : 0);
|
|
23961
|
-
scrollYStore.offsetSize = offsetYSize;
|
|
23962
|
-
scrollYStore.visibleSize = visibleYSize;
|
|
23963
|
-
scrollYStore.endIndex = Math.max(scrollYStore.startIndex + visibleYSize + offsetYSize, scrollYStore.endIndex);
|
|
23964
|
-
updateYData();
|
|
23965
|
-
}
|
|
23966
|
-
else {
|
|
23967
|
-
updateYSpace();
|
|
23968
|
-
}
|
|
23969
|
-
});
|
|
23970
|
-
};
|
|
23971
|
-
/**
|
|
23972
|
-
* 清除滚动条
|
|
23973
|
-
*/
|
|
23974
|
-
const clearScroll = () => {
|
|
23975
|
-
const scrollBodyElem = refVirtualWrapper.value;
|
|
23976
|
-
if (scrollBodyElem) {
|
|
23977
|
-
scrollBodyElem.scrollTop = 0;
|
|
23978
|
-
}
|
|
23979
|
-
return nextTick();
|
|
23980
|
-
};
|
|
23981
|
-
/**
|
|
23982
|
-
* 如果有滚动条,则滚动到对应的位置
|
|
23983
|
-
*/
|
|
23984
|
-
const scrollTo = (scrollLeft, scrollTop) => {
|
|
23985
|
-
const scrollBodyElem = refVirtualWrapper.value;
|
|
23986
|
-
if (scrollLeft) {
|
|
23987
|
-
if (!XEUtils.isNumber(scrollLeft)) {
|
|
23988
|
-
scrollTop = scrollLeft.top;
|
|
23989
|
-
scrollLeft = scrollLeft.left;
|
|
23990
|
-
}
|
|
23991
|
-
}
|
|
23992
|
-
if (XEUtils.isNumber(scrollLeft)) {
|
|
23993
|
-
scrollBodyElem.scrollLeft = scrollLeft;
|
|
23994
|
-
}
|
|
23995
|
-
if (XEUtils.isNumber(scrollTop)) {
|
|
23996
|
-
scrollBodyElem.scrollTop = scrollTop;
|
|
23997
|
-
}
|
|
23998
|
-
if (reactData.scrollYLoad) {
|
|
23999
|
-
return new Promise(resolve => {
|
|
24000
|
-
setTimeout(() => {
|
|
24001
|
-
nextTick(() => {
|
|
24002
|
-
resolve();
|
|
24003
|
-
});
|
|
24004
|
-
}, 50);
|
|
24005
|
-
});
|
|
24006
|
-
}
|
|
24007
|
-
return nextTick();
|
|
24008
|
-
};
|
|
24009
|
-
/**
|
|
24010
|
-
* 刷新滚动条
|
|
24011
|
-
*/
|
|
24012
|
-
const refreshScroll = () => {
|
|
24013
|
-
const { lastScrollLeft, lastScrollTop } = internalData;
|
|
24014
|
-
return clearScroll().then(() => {
|
|
24015
|
-
if (lastScrollLeft || lastScrollTop) {
|
|
24016
|
-
internalData.lastScrollLeft = 0;
|
|
24017
|
-
internalData.lastScrollTop = 0;
|
|
24018
|
-
return scrollTo(lastScrollLeft, lastScrollTop);
|
|
24019
|
-
}
|
|
24020
|
-
});
|
|
24021
|
-
};
|
|
24022
|
-
/**
|
|
24023
|
-
* 重新计算列表
|
|
24024
|
-
*/
|
|
24025
|
-
const recalculate = () => {
|
|
24026
|
-
const el = refElem.value;
|
|
24027
|
-
if (el) {
|
|
24028
|
-
const parentEl = el.parentElement;
|
|
24029
|
-
reactData.parentHeight = parentEl ? parentEl.clientHeight : 0;
|
|
24030
|
-
updateHeight();
|
|
24031
|
-
if (el.clientWidth && el.clientHeight) {
|
|
24032
|
-
return computeScrollLoad();
|
|
24033
|
-
}
|
|
24034
|
-
}
|
|
24035
|
-
return nextTick();
|
|
24036
|
-
};
|
|
24037
|
-
const loadYData = (evnt) => {
|
|
24038
|
-
const { scrollYStore } = internalData;
|
|
24039
|
-
const { startIndex, endIndex, visibleSize, offsetSize, rowHeight } = scrollYStore;
|
|
24040
|
-
const scrollBodyElem = evnt.target;
|
|
24041
|
-
const scrollTop = scrollBodyElem.scrollTop;
|
|
24042
|
-
const toVisibleIndex = Math.floor(scrollTop / rowHeight);
|
|
24043
|
-
const offsetStartIndex = Math.max(0, toVisibleIndex - 1 - offsetSize);
|
|
24044
|
-
const offsetEndIndex = toVisibleIndex + visibleSize + offsetSize;
|
|
24045
|
-
if (toVisibleIndex <= startIndex || toVisibleIndex >= endIndex - visibleSize - 1) {
|
|
24046
|
-
if (startIndex !== offsetStartIndex || endIndex !== offsetEndIndex) {
|
|
24047
|
-
scrollYStore.startIndex = offsetStartIndex;
|
|
24048
|
-
scrollYStore.endIndex = offsetEndIndex;
|
|
24049
|
-
updateYData();
|
|
24050
|
-
}
|
|
24051
|
-
}
|
|
24052
|
-
};
|
|
24053
|
-
const scrollEvent = (evnt) => {
|
|
24054
|
-
const scrollBodyElem = evnt.target;
|
|
24055
|
-
const scrollTop = scrollBodyElem.scrollTop;
|
|
24056
|
-
const scrollLeft = scrollBodyElem.scrollLeft;
|
|
24057
|
-
const isX = scrollLeft !== internalData.lastScrollLeft;
|
|
24058
|
-
const isY = scrollTop !== internalData.lastScrollTop;
|
|
24059
|
-
internalData.lastScrollTop = scrollTop;
|
|
24060
|
-
internalData.lastScrollLeft = scrollLeft;
|
|
24061
|
-
if (reactData.scrollYLoad) {
|
|
24062
|
-
loadYData(evnt);
|
|
24063
|
-
}
|
|
24064
|
-
dispatchEvent('scroll', { scrollLeft, scrollTop, isX, isY }, evnt);
|
|
24065
|
-
};
|
|
24066
|
-
/**
|
|
24067
|
-
* 加载数据
|
|
24068
|
-
* @param {Array} datas 数据
|
|
24069
|
-
*/
|
|
24070
|
-
const loadData = (datas) => {
|
|
24071
|
-
const { scrollYStore } = internalData;
|
|
24072
|
-
const sYOpts = computeSYOpts.value;
|
|
24073
|
-
const fullData = datas || [];
|
|
24074
|
-
Object.assign(scrollYStore, {
|
|
24075
|
-
startIndex: 0,
|
|
24076
|
-
endIndex: 1,
|
|
24077
|
-
visibleSize: 0
|
|
24078
|
-
});
|
|
24079
|
-
internalData.fullData = fullData;
|
|
24080
|
-
// 如果gt为0,则总是启用
|
|
24081
|
-
reactData.scrollYLoad = !!sYOpts.enabled && sYOpts.gt > -1 && (sYOpts.gt === 0 || sYOpts.gt <= fullData.length);
|
|
24082
|
-
handleData();
|
|
24083
|
-
return computeScrollLoad().then(() => {
|
|
24084
|
-
refreshScroll();
|
|
24085
|
-
});
|
|
24086
|
-
};
|
|
24087
|
-
const listMethods = {
|
|
24088
|
-
dispatchEvent,
|
|
24089
|
-
loadData,
|
|
24090
|
-
/**
|
|
24091
|
-
* 重新加载数据
|
|
24092
|
-
* @param {Array} datas 数据
|
|
24093
|
-
*/
|
|
24094
|
-
reloadData(datas) {
|
|
24095
|
-
clearScroll();
|
|
24096
|
-
return loadData(datas);
|
|
24097
|
-
},
|
|
24098
|
-
recalculate,
|
|
24099
|
-
scrollTo,
|
|
24100
|
-
refreshScroll,
|
|
24101
|
-
clearScroll
|
|
24102
|
-
};
|
|
24103
|
-
Object.assign($xeList, listMethods);
|
|
24104
|
-
const renderVN = () => {
|
|
24105
|
-
const { className, loading } = props;
|
|
24106
|
-
const { bodyHeight, topSpaceHeight, items } = reactData;
|
|
24107
|
-
const defaultSlot = slots.default;
|
|
24108
|
-
const vSize = computeSize.value;
|
|
24109
|
-
const styles = computeStyles.value;
|
|
24110
|
-
return h('div', {
|
|
24111
|
-
ref: refElem,
|
|
24112
|
-
class: ['vxe-list', className ? (XEUtils.isFunction(className) ? className({ $list: $xeList }) : className) : '', {
|
|
24113
|
-
[`size--${vSize}`]: vSize,
|
|
24114
|
-
'is--loading': loading
|
|
24115
|
-
}]
|
|
24116
|
-
}, [
|
|
24117
|
-
h('div', {
|
|
24118
|
-
ref: refVirtualWrapper,
|
|
24119
|
-
class: 'vxe-list--virtual-wrapper',
|
|
24120
|
-
style: styles,
|
|
24121
|
-
onScroll: scrollEvent
|
|
24122
|
-
}, [
|
|
24123
|
-
h('div', {
|
|
24124
|
-
class: 'vxe-list--y-space',
|
|
24125
|
-
style: {
|
|
24126
|
-
height: bodyHeight ? `${bodyHeight}px` : ''
|
|
24127
|
-
}
|
|
24128
|
-
}),
|
|
24129
|
-
h('div', {
|
|
24130
|
-
ref: refVirtualBody,
|
|
24131
|
-
class: 'vxe-list--body',
|
|
24132
|
-
style: {
|
|
24133
|
-
marginTop: topSpaceHeight ? `${topSpaceHeight}px` : ''
|
|
24134
|
-
}
|
|
24135
|
-
}, defaultSlot ? defaultSlot({ items, $list: $xeList }) : [])
|
|
24136
|
-
]),
|
|
24137
|
-
/**
|
|
24138
|
-
* 加载中
|
|
24139
|
-
*/
|
|
24140
|
-
h(VxeLoadingComponent, {
|
|
24141
|
-
class: 'vxe-list--loading',
|
|
24142
|
-
modelValue: loading
|
|
24143
|
-
})
|
|
24144
|
-
]);
|
|
24145
|
-
};
|
|
24146
|
-
const dataFlag = ref(0);
|
|
24147
|
-
watch(() => props.data ? props.data.length : -1, () => {
|
|
24148
|
-
dataFlag.value++;
|
|
24149
|
-
});
|
|
24150
|
-
watch(() => props.data, () => {
|
|
24151
|
-
dataFlag.value++;
|
|
24152
|
-
});
|
|
24153
|
-
watch(dataFlag, () => {
|
|
24154
|
-
loadData(props.data || []);
|
|
24155
|
-
});
|
|
24156
|
-
watch(() => props.height, () => {
|
|
24157
|
-
recalculate();
|
|
24158
|
-
});
|
|
24159
|
-
watch(() => props.maxHeight, () => {
|
|
24160
|
-
recalculate();
|
|
24161
|
-
});
|
|
24162
|
-
watch(() => props.syncResize, (value) => {
|
|
24163
|
-
if (value) {
|
|
24164
|
-
recalculate();
|
|
24165
|
-
nextTick(() => setTimeout(() => recalculate()));
|
|
24166
|
-
}
|
|
24167
|
-
});
|
|
24168
|
-
onActivated(() => {
|
|
24169
|
-
recalculate().then(() => refreshScroll());
|
|
24170
|
-
});
|
|
24171
|
-
nextTick(() => {
|
|
24172
|
-
loadData(props.data || []);
|
|
24173
|
-
});
|
|
24174
|
-
onMounted(() => {
|
|
24175
|
-
recalculate();
|
|
24176
|
-
if (props.autoResize) {
|
|
24177
|
-
const el = refElem.value;
|
|
24178
|
-
const resizeObserver = globalResize.create(() => recalculate());
|
|
24179
|
-
resizeObserver.observe(el);
|
|
24180
|
-
if (el) {
|
|
24181
|
-
resizeObserver.observe(el.parentElement);
|
|
24182
|
-
}
|
|
24183
|
-
internalData.resizeObserver = resizeObserver;
|
|
24184
|
-
}
|
|
24185
|
-
globalEvents.on($xeList, 'resize', recalculate);
|
|
24186
|
-
});
|
|
24187
|
-
onBeforeUnmount(() => {
|
|
24188
|
-
const { resizeObserver } = internalData;
|
|
24189
|
-
if (resizeObserver) {
|
|
24190
|
-
resizeObserver.disconnect();
|
|
24191
|
-
}
|
|
24192
|
-
globalEvents.off($xeList, 'resize');
|
|
24193
|
-
XEUtils.assign(reactData, createReactData$4());
|
|
24194
|
-
XEUtils.assign(internalData, createInternalData$6());
|
|
24195
|
-
});
|
|
24196
|
-
$xeList.renderVN = renderVN;
|
|
24197
|
-
return $xeList;
|
|
24198
|
-
},
|
|
24199
|
-
render() {
|
|
24200
|
-
return this.renderVN();
|
|
24201
|
-
}
|
|
24202
|
-
});
|
|
24203
|
-
|
|
24204
25180
|
const VxeList = Object.assign(VxeListComponent, {
|
|
24205
25181
|
install(app) {
|
|
24206
25182
|
app.component(VxeListComponent.name, VxeListComponent);
|
|
@@ -36005,6 +36981,45 @@ dynamicApp.use(VxeTour);
|
|
|
36005
36981
|
VxeUI.component(VxeTourComponent);
|
|
36006
36982
|
const Tour = VxeTour;
|
|
36007
36983
|
|
|
36984
|
+
function enNodeValue(nodeid) {
|
|
36985
|
+
return XEUtils.eqNull(nodeid) ? '' : encodeURIComponent(`${nodeid}`);
|
|
36986
|
+
}
|
|
36987
|
+
function deNodeValue(nodeid) {
|
|
36988
|
+
return nodeid ? decodeURIComponent(`${nodeid}`) : nodeid;
|
|
36989
|
+
}
|
|
36990
|
+
function countTreeExpand($xeTree, prevNode) {
|
|
36991
|
+
let count = 1;
|
|
36992
|
+
if (!prevNode) {
|
|
36993
|
+
return count;
|
|
36994
|
+
}
|
|
36995
|
+
const props = $xeTree.props;
|
|
36996
|
+
const { transform } = props;
|
|
36997
|
+
const reactData = $xeTree.reactData;
|
|
36998
|
+
const { updateExpandedFlag } = reactData;
|
|
36999
|
+
const internalData = $xeTree.internalData;
|
|
37000
|
+
const { treeExpandedMaps } = internalData;
|
|
37001
|
+
const { computeChildrenField, computeMapChildrenField } = $xeTree.getComputeMaps();
|
|
37002
|
+
const childrenField = computeChildrenField.value;
|
|
37003
|
+
const mapChildrenField = computeMapChildrenField.value;
|
|
37004
|
+
const nodeChildren = prevNode[transform ? mapChildrenField : childrenField];
|
|
37005
|
+
if (nodeChildren && updateExpandedFlag && treeExpandedMaps[$xeTree.getNodeId(prevNode)]) {
|
|
37006
|
+
for (let index = 0; index < nodeChildren.length; index++) {
|
|
37007
|
+
count += countTreeExpand($xeTree, nodeChildren[index]);
|
|
37008
|
+
}
|
|
37009
|
+
}
|
|
37010
|
+
return count;
|
|
37011
|
+
}
|
|
37012
|
+
function calcTreeLine($xeTree, node, prevNode) {
|
|
37013
|
+
const internalData = $xeTree.internalData;
|
|
37014
|
+
const { scrollYStore } = internalData;
|
|
37015
|
+
const { rowHeight } = scrollYStore;
|
|
37016
|
+
let expandSize = 1;
|
|
37017
|
+
if (prevNode) {
|
|
37018
|
+
expandSize = countTreeExpand($xeTree, prevNode);
|
|
37019
|
+
}
|
|
37020
|
+
return (rowHeight || 28) * expandSize - (prevNode ? 1 : 12);
|
|
37021
|
+
}
|
|
37022
|
+
|
|
36008
37023
|
// 跨树拖拽
|
|
36009
37024
|
const crossTreeDragNodeInfo = reactive({
|
|
36010
37025
|
node: null
|
|
@@ -36367,6 +37382,9 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
36367
37382
|
getComputeMaps: () => computeMaps
|
|
36368
37383
|
};
|
|
36369
37384
|
const getNodeId = (node) => {
|
|
37385
|
+
if (!node) {
|
|
37386
|
+
return '';
|
|
37387
|
+
}
|
|
36370
37388
|
const valueField = computeValueField.value;
|
|
36371
37389
|
const nodeKey = XEUtils.get(node, valueField);
|
|
36372
37390
|
return enNodeValue(nodeKey);
|
|
@@ -36522,7 +37540,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
36522
37540
|
const valueField = computeValueField.value;
|
|
36523
37541
|
const childrenField = computeChildrenField.value;
|
|
36524
37542
|
const keyMaps = {};
|
|
36525
|
-
XEUtils.eachTree(treeFullData, (item, index, items, path,
|
|
37543
|
+
XEUtils.eachTree(treeFullData, (item, index, items, path, parenItem, nodes) => {
|
|
36526
37544
|
let nodeid = getNodeId(item);
|
|
36527
37545
|
if (!nodeid) {
|
|
36528
37546
|
nodeid = getNodeUniqueId();
|
|
@@ -36534,7 +37552,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
36534
37552
|
$index: -1,
|
|
36535
37553
|
_index: -1,
|
|
36536
37554
|
items,
|
|
36537
|
-
parent,
|
|
37555
|
+
parent: parenItem,
|
|
36538
37556
|
nodes,
|
|
36539
37557
|
level: nodes.length - 1,
|
|
36540
37558
|
treeIndex: index,
|
|
@@ -36550,7 +37568,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
36550
37568
|
const childrenField = computeChildrenField.value;
|
|
36551
37569
|
const mapChildrenField = computeMapChildrenField.value;
|
|
36552
37570
|
let vtIndex = 0;
|
|
36553
|
-
XEUtils.eachTree(afterTreeList, (item, index, items) => {
|
|
37571
|
+
XEUtils.eachTree(afterTreeList, (item, index, items, path, parenItem, nodes) => {
|
|
36554
37572
|
const nodeid = getNodeId(item);
|
|
36555
37573
|
const nodeItem = nodeMaps[nodeid];
|
|
36556
37574
|
if (nodeItem) {
|
|
@@ -36565,9 +37583,9 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
36565
37583
|
$index: -1,
|
|
36566
37584
|
_index: vtIndex,
|
|
36567
37585
|
items,
|
|
36568
|
-
parent,
|
|
36569
|
-
nodes
|
|
36570
|
-
level:
|
|
37586
|
+
parent: parenItem,
|
|
37587
|
+
nodes,
|
|
37588
|
+
level: nodes.length - 1,
|
|
36571
37589
|
treeIndex: index,
|
|
36572
37590
|
lineCount: 0,
|
|
36573
37591
|
treeLoaded: false
|
|
@@ -38377,7 +39395,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
38377
39395
|
const extraSlot = slots.extra;
|
|
38378
39396
|
const isExpand = updateExpandedFlag && treeExpandedMaps[nodeid];
|
|
38379
39397
|
const nodeItem = nodeMaps[nodeid] || {};
|
|
38380
|
-
const
|
|
39398
|
+
const nodeTitle = XEUtils.get(node, titleField);
|
|
38381
39399
|
const nLevel = nodeItem.level;
|
|
38382
39400
|
let isRadioChecked = false;
|
|
38383
39401
|
if (showRadio) {
|
|
@@ -38467,7 +39485,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
38467
39485
|
}, [
|
|
38468
39486
|
h('div', {
|
|
38469
39487
|
class: 'vxe-tree--node-item-title'
|
|
38470
|
-
}, titleSlot ? getSlotVNs(titleSlot(nParams)) : `${
|
|
39488
|
+
}, titleSlot ? getSlotVNs(titleSlot(nParams)) : `${nodeTitle}`),
|
|
38471
39489
|
extraSlot
|
|
38472
39490
|
? h('div', {
|
|
38473
39491
|
class: 'vxe-tree--node-item-extra'
|
|
@@ -38633,6 +39651,15 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
38633
39651
|
watch(() => props.data, () => {
|
|
38634
39652
|
dataFlag.value++;
|
|
38635
39653
|
});
|
|
39654
|
+
watch(() => props.rootParentValue, () => {
|
|
39655
|
+
dataFlag.value++;
|
|
39656
|
+
});
|
|
39657
|
+
watch(() => props.rootValues ? props.rootValues.length : 0, () => {
|
|
39658
|
+
dataFlag.value++;
|
|
39659
|
+
});
|
|
39660
|
+
watch(() => props.rootValues, () => {
|
|
39661
|
+
dataFlag.value++;
|
|
39662
|
+
});
|
|
38636
39663
|
watch(dataFlag, () => {
|
|
38637
39664
|
loadData(props.data || []);
|
|
38638
39665
|
});
|
|
@@ -38665,19 +39692,6 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
38665
39692
|
watch(hFlag, () => {
|
|
38666
39693
|
recalculate();
|
|
38667
39694
|
});
|
|
38668
|
-
const rootConf = ref(0);
|
|
38669
|
-
watch(() => props.rootParentValue, () => {
|
|
38670
|
-
rootConf.value++;
|
|
38671
|
-
});
|
|
38672
|
-
watch(() => props.rootValues ? props.rootValues.length : 0, () => {
|
|
38673
|
-
rootConf.value++;
|
|
38674
|
-
});
|
|
38675
|
-
watch(() => props.rootValues, () => {
|
|
38676
|
-
rootConf.value++;
|
|
38677
|
-
});
|
|
38678
|
-
watch(rootConf, () => {
|
|
38679
|
-
loadData(props.data || []);
|
|
38680
|
-
});
|
|
38681
39695
|
onMounted(() => {
|
|
38682
39696
|
const { transform, drag, menuConfig } = props;
|
|
38683
39697
|
const dragOpts = computeDragOpts.value;
|
|
@@ -38687,6 +39701,9 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
38687
39701
|
if (dragOpts.isCrossTreeDrag) {
|
|
38688
39702
|
errLog('vxe.error.notProp', ['drag-config.isCrossTreeDrag']);
|
|
38689
39703
|
}
|
|
39704
|
+
// if (valueField) {
|
|
39705
|
+
// errLog('vxe.error.delProp', ['value-field', 'value-field'])
|
|
39706
|
+
// }
|
|
38690
39707
|
const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
|
|
38691
39708
|
if (menuConfig && !VxeUIContextMenu) {
|
|
38692
39709
|
errLog('vxe.error.reqComp', ['vxe-context-menu']);
|
|
@@ -38921,12 +39938,12 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
38921
39938
|
return disabled;
|
|
38922
39939
|
});
|
|
38923
39940
|
const computeBtnTransfer = computed(() => {
|
|
38924
|
-
const { transfer } = props;
|
|
38925
39941
|
const popupOpts = computePopupOpts.value;
|
|
38926
|
-
|
|
38927
|
-
|
|
39942
|
+
const { transfer } = popupOpts;
|
|
39943
|
+
if (XEUtils.isBoolean(transfer)) {
|
|
39944
|
+
return transfer;
|
|
38928
39945
|
}
|
|
38929
|
-
if (transfer === null) {
|
|
39946
|
+
if (props.transfer === null) {
|
|
38930
39947
|
const globalTransfer = getConfig$3().treeSelect.transfer;
|
|
38931
39948
|
if (XEUtils.isBoolean(globalTransfer)) {
|
|
38932
39949
|
return globalTransfer;
|
|
@@ -38935,7 +39952,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
38935
39952
|
return true;
|
|
38936
39953
|
}
|
|
38937
39954
|
}
|
|
38938
|
-
return transfer;
|
|
39955
|
+
return props.transfer;
|
|
38939
39956
|
});
|
|
38940
39957
|
const computePopupOpts = computed(() => {
|
|
38941
39958
|
return Object.assign({}, getConfig$3().treeSelect.popupConfig, props.popupConfig);
|
|
@@ -39004,12 +40021,16 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
39004
40021
|
const treeOpts = computeTreeOpts.value;
|
|
39005
40022
|
return Object.assign({}, treeOpts.filterConfig, props.filterConfig);
|
|
39006
40023
|
});
|
|
40024
|
+
const computeSelectVals = computed(() => {
|
|
40025
|
+
const { modelValue } = props;
|
|
40026
|
+
return XEUtils.eqNull(modelValue) ? [] : (XEUtils.isArray(modelValue) ? modelValue : [modelValue]);
|
|
40027
|
+
});
|
|
39007
40028
|
const computeSelectLabel = computed(() => {
|
|
39008
|
-
const {
|
|
40029
|
+
const { showFullLabel } = props;
|
|
39009
40030
|
const { fullOptFlag, lazyOptFlag } = reactData;
|
|
39010
40031
|
const { fullNodeMaps, lazyNodeMaps } = internalData;
|
|
39011
40032
|
const labelField = computeLabelField.value;
|
|
39012
|
-
const selectVals =
|
|
40033
|
+
const selectVals = computeSelectVals.value;
|
|
39013
40034
|
return selectVals.map(val => {
|
|
39014
40035
|
const cacheItem = fullNodeMaps[val];
|
|
39015
40036
|
if (fullOptFlag && cacheItem) {
|
|
@@ -39089,12 +40110,12 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
39089
40110
|
nodeid = getOptUniqueId();
|
|
39090
40111
|
}
|
|
39091
40112
|
if (keyMaps[nodeid]) {
|
|
39092
|
-
errLog('vxe.error.repeatKey', [
|
|
40113
|
+
errLog('vxe.error.repeatKey', [nodeKeyField, nodeid]);
|
|
39093
40114
|
}
|
|
39094
40115
|
keyMaps[nodeid] = true;
|
|
39095
40116
|
const value = item[valueField];
|
|
39096
40117
|
if (nodeMaps[value]) {
|
|
39097
|
-
errLog('vxe.error.repeatKey', [
|
|
40118
|
+
errLog('vxe.error.repeatKey', [valueField, value]);
|
|
39098
40119
|
}
|
|
39099
40120
|
nodeMaps[value] = {
|
|
39100
40121
|
item,
|
|
@@ -39102,7 +40123,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
39102
40123
|
items,
|
|
39103
40124
|
parent: parentItem,
|
|
39104
40125
|
nodes,
|
|
39105
|
-
fullLabel: nodes.map(item => item[labelField]).join((separator || '/
|
|
40126
|
+
fullLabel: nodes.map(item => item[labelField]).join((separator || ' / '))
|
|
39106
40127
|
};
|
|
39107
40128
|
};
|
|
39108
40129
|
if (optList) {
|
|
@@ -39171,7 +40192,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
39171
40192
|
handleStyle();
|
|
39172
40193
|
return nextTick().then(handleStyle);
|
|
39173
40194
|
};
|
|
39174
|
-
const showOptionPanel = () => {
|
|
40195
|
+
const showOptionPanel = (evnt) => {
|
|
39175
40196
|
const { loading, remote, filterable } = props;
|
|
39176
40197
|
const { fullOptionList } = internalData;
|
|
39177
40198
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -39195,7 +40216,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
39195
40216
|
}, 10);
|
|
39196
40217
|
updateZindex();
|
|
39197
40218
|
updatePlacement();
|
|
39198
|
-
dispatchEvent('visible-change', { visible: true }, null);
|
|
40219
|
+
dispatchEvent('visible-change', { visible: true }, evnt || null);
|
|
39199
40220
|
}
|
|
39200
40221
|
};
|
|
39201
40222
|
const hideOptionPanel = (evnt) => {
|
|
@@ -39234,7 +40255,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
39234
40255
|
$tree.setAllCheckboxNode(true).then(({ checkNodeKeys, checkNodes }) => {
|
|
39235
40256
|
changeEvent($event, checkNodeKeys, checkNodes[0]);
|
|
39236
40257
|
dispatchEvent('all-change', { value: checkNodeKeys }, $event);
|
|
39237
|
-
if (XEUtils.isBoolean(
|
|
40258
|
+
if (XEUtils.isBoolean(checkedClosable) ? checkedClosable : autoClose) {
|
|
39238
40259
|
hideOptionPanel($event);
|
|
39239
40260
|
}
|
|
39240
40261
|
});
|
|
@@ -39248,7 +40269,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
39248
40269
|
if ($tree) {
|
|
39249
40270
|
const value = multiple ? [] : null;
|
|
39250
40271
|
$tree.clearCheckboxNode().then(() => {
|
|
39251
|
-
if (XEUtils.isBoolean(
|
|
40272
|
+
if (XEUtils.isBoolean(clearClosable) ? clearClosable : autoClose) {
|
|
39252
40273
|
hideOptionPanel($event);
|
|
39253
40274
|
}
|
|
39254
40275
|
});
|
|
@@ -39335,7 +40356,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
39335
40356
|
if (!isDisabled) {
|
|
39336
40357
|
if (!reactData.visiblePanel) {
|
|
39337
40358
|
reactData.triggerFocusPanel = true;
|
|
39338
|
-
showOptionPanel();
|
|
40359
|
+
showOptionPanel(evnt);
|
|
39339
40360
|
setTimeout(() => {
|
|
39340
40361
|
reactData.triggerFocusPanel = false;
|
|
39341
40362
|
}, 150);
|
|
@@ -39379,7 +40400,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
39379
40400
|
hideOptionPanel($event);
|
|
39380
40401
|
}
|
|
39381
40402
|
else {
|
|
39382
|
-
showOptionPanel();
|
|
40403
|
+
showOptionPanel($event);
|
|
39383
40404
|
}
|
|
39384
40405
|
}
|
|
39385
40406
|
};
|