vxe-pc-ui 4.15.2 → 4.15.3
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 +774 -211
- package/es/backtop/src/backtop.js +2 -1
- package/es/button/src/button.js +3 -2
- package/es/calendar/src/calendar.js +2 -1
- package/es/cascader/src/cascader.js +2 -1
- package/es/checkbox/src/group.js +5 -1
- package/es/date-panel/src/util.js +27 -16
- package/es/date-picker/src/date-picker.js +572 -74
- package/es/date-range-picker/src/date-range-picker.js +3 -2
- package/es/drawer/src/drawer.js +2 -0
- package/es/form/render/index.js +3 -2
- package/es/form/src/form.js +6 -5
- package/es/form/src/itemInfo.js +6 -5
- package/es/input/src/input.js +2 -1
- package/es/menu/src/menu.js +2 -1
- package/es/modal/src/modal.js +5 -2
- package/es/pager/src/pager.js +4 -3
- package/es/radio/src/group.js +5 -1
- package/es/select/src/select.js +25 -20
- package/es/splitter/src/splitter.js +7 -6
- package/es/table-select/src/table-select.js +21 -16
- package/es/tabs/src/tabs.js +4 -3
- package/es/textarea/src/textarea.js +2 -1
- package/es/tree/src/tree.js +3 -2
- package/es/tree-select/src/tree-select.js +2 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +7 -1
- package/es/upload/src/upload.js +12 -3
- package/lib/backtop/src/backtop.js +5 -2
- package/lib/backtop/src/backtop.min.js +1 -1
- package/lib/button/src/button.js +4 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/calendar/src/calendar.js +4 -1
- package/lib/calendar/src/calendar.min.js +1 -1
- package/lib/cascader/src/cascader.js +4 -1
- package/lib/cascader/src/cascader.min.js +1 -1
- package/lib/checkbox/src/group.js +5 -1
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/date-panel/src/util.js +37 -19
- package/lib/date-panel/src/util.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +620 -77
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +4 -1
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/drawer/src/drawer.js +2 -0
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/form/render/index.js +4 -1
- package/lib/form/render/index.min.js +1 -1
- package/lib/form/src/form.js +8 -4
- package/lib/form/src/form.min.js +1 -1
- package/lib/form/src/itemInfo.js +7 -4
- package/lib/form/src/itemInfo.min.js +1 -1
- package/lib/index.umd.js +847 -177
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +6 -3
- package/lib/input/src/input.min.js +1 -1
- package/lib/menu/src/menu.js +4 -1
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/modal/src/modal.js +8 -2
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/pager/src/pager.js +6 -2
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/radio/src/group.js +5 -1
- package/lib/radio/src/group.min.js +1 -1
- package/lib/select/src/select.js +27 -20
- package/lib/select/src/select.min.js +1 -1
- package/lib/splitter/src/splitter.js +12 -8
- package/lib/splitter/src/splitter.min.js +1 -1
- package/lib/table-select/src/table-select.js +22 -15
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tabs/src/tabs.js +7 -3
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/textarea/src/textarea.js +4 -1
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/tree/src/tree.js +7 -4
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +7 -3
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +8 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +20 -3
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +1 -1
- package/packages/backtop/src/backtop.ts +3 -1
- package/packages/button/src/button.ts +4 -2
- package/packages/calendar/src/calendar.ts +3 -1
- package/packages/cascader/src/cascader.ts +3 -1
- package/packages/checkbox/src/group.ts +6 -2
- package/packages/date-panel/src/util.ts +28 -16
- package/packages/date-picker/src/date-picker.ts +583 -75
- package/packages/date-range-picker/src/date-range-picker.ts +4 -2
- package/packages/drawer/src/drawer.ts +2 -0
- package/packages/form/render/index.ts +4 -2
- package/packages/form/src/form.ts +7 -5
- package/packages/form/src/itemInfo.ts +7 -5
- package/packages/input/src/input.ts +3 -1
- package/packages/menu/src/menu.ts +3 -1
- package/packages/modal/src/modal.ts +6 -2
- package/packages/pager/src/pager.ts +5 -3
- package/packages/radio/src/group.ts +6 -2
- package/packages/select/src/select.ts +29 -22
- package/packages/splitter/src/splitter.ts +8 -6
- package/packages/table-select/src/table-select.ts +24 -17
- package/packages/tabs/src/tabs.ts +5 -3
- package/packages/textarea/src/textarea.ts +3 -1
- package/packages/tree/src/tree.ts +4 -2
- package/packages/tree-select/src/tree-select.ts +3 -1
- package/packages/ui/src/log.ts +7 -0
- package/packages/upload/src/upload.ts +14 -3
- package/types/components/date-picker.d.ts +14 -6
- package/types/components/drawer.d.ts +2 -0
- package/types/components/modal.d.ts +2 -0
- package/types/components/upload.d.ts +28 -1
- /package/es/icon/{iconfont.1781753592499.ttf → iconfont.1781852740683.ttf} +0 -0
- /package/es/icon/{iconfont.1781753592499.woff → iconfont.1781852740683.woff} +0 -0
- /package/es/icon/{iconfont.1781753592499.woff2 → iconfont.1781852740683.woff2} +0 -0
- /package/es/{iconfont.1781753592499.ttf → iconfont.1781852740683.ttf} +0 -0
- /package/es/{iconfont.1781753592499.woff → iconfont.1781852740683.woff} +0 -0
- /package/es/{iconfont.1781753592499.woff2 → iconfont.1781852740683.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781753592499.ttf → iconfont.1781852740683.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781753592499.woff → iconfont.1781852740683.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781753592499.woff2 → iconfont.1781852740683.woff2} +0 -0
- /package/lib/{iconfont.1781753592499.ttf → iconfont.1781852740683.ttf} +0 -0
- /package/lib/{iconfont.1781753592499.woff → iconfont.1781852740683.woff} +0 -0
- /package/lib/{iconfont.1781753592499.woff2 → iconfont.1781852740683.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -80,19 +80,25 @@ function checkDynamic() {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
const version$1 = `ui v${"4.15.
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
const version$1 = `ui v${"4.15.3"}`;
|
|
84
|
+
function createComponentLog(name) {
|
|
85
|
+
return {
|
|
86
|
+
warnLog: log.create('warn', `${version$1} ${name}`),
|
|
87
|
+
errLog: log.create('error', `${version$1} ${name}`)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const warnLog$b = log.create('warn', version$1);
|
|
91
|
+
log.create('error', version$1);
|
|
86
92
|
|
|
87
|
-
const version = "4.15.
|
|
93
|
+
const version = "4.15.3";
|
|
88
94
|
VxeUI.uiVersion = version;
|
|
89
95
|
VxeUI.dynamicApp = dynamicApp;
|
|
90
96
|
function config(options) {
|
|
91
|
-
warnLog('vxe.error.delFunc', ['config', 'setConfig']);
|
|
97
|
+
warnLog$b('vxe.error.delFunc', ['config', 'setConfig']);
|
|
92
98
|
return setConfig$1(options);
|
|
93
99
|
}
|
|
94
100
|
function setup(options) {
|
|
95
|
-
warnLog('vxe.error.delFunc', ['setup', 'setConfig']);
|
|
101
|
+
warnLog$b('vxe.error.delFunc', ['setup', 'setConfig']);
|
|
96
102
|
return setConfig$1(options);
|
|
97
103
|
}
|
|
98
104
|
VxeUI.config = config;
|
|
@@ -3041,6 +3047,7 @@ dynamicApp.use(VxeTooltip);
|
|
|
3041
3047
|
VxeUI.component(VxeTooltipComponent);
|
|
3042
3048
|
const Tooltip = VxeTooltip;
|
|
3043
3049
|
|
|
3050
|
+
const { warnLog: warnLog$a } = createComponentLog('button');
|
|
3044
3051
|
const VxeButtonComponent = defineVxeComponent({
|
|
3045
3052
|
name: 'VxeButton',
|
|
3046
3053
|
props: {
|
|
@@ -3759,7 +3766,7 @@ const VxeButtonComponent = defineVxeComponent({
|
|
|
3759
3766
|
$xeButton.renderVN = renderVN;
|
|
3760
3767
|
onMounted(() => {
|
|
3761
3768
|
if (props.type === 'text') {
|
|
3762
|
-
warnLog('vxe.error.delProp', ['
|
|
3769
|
+
warnLog$a('vxe.error.delProp', ['type=text', 'mode=text']);
|
|
3763
3770
|
}
|
|
3764
3771
|
globalEvents.on($xeButton, 'mousewheel', handleGlobalMousewheelEvent);
|
|
3765
3772
|
globalEvents.on($xeButton, 'mousedown', handleGlobalMousedownEvent);
|
|
@@ -3786,12 +3793,13 @@ dynamicApp.use(VxeButton);
|
|
|
3786
3793
|
VxeUI.component(VxeButtonComponent);
|
|
3787
3794
|
const Button = VxeButton;
|
|
3788
3795
|
|
|
3789
|
-
|
|
3796
|
+
const { errLog: errLog$h } = createComponentLog('backtop');
|
|
3797
|
+
function createInternalData$e() {
|
|
3790
3798
|
return {
|
|
3791
3799
|
targetEl: null
|
|
3792
3800
|
};
|
|
3793
3801
|
}
|
|
3794
|
-
function createReactData$
|
|
3802
|
+
function createReactData$f() {
|
|
3795
3803
|
return {
|
|
3796
3804
|
showBtn: false,
|
|
3797
3805
|
backtopZindex: 0
|
|
@@ -3870,8 +3878,8 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
3870
3878
|
const xID = XEUtils.uniqueId();
|
|
3871
3879
|
const refElem = ref();
|
|
3872
3880
|
const { computeSize } = useSize(props);
|
|
3873
|
-
const internalData = createInternalData$
|
|
3874
|
-
const reactData = reactive(createReactData$
|
|
3881
|
+
const internalData = createInternalData$e();
|
|
3882
|
+
const reactData = reactive(createReactData$f());
|
|
3875
3883
|
const refMaps = {
|
|
3876
3884
|
refElem
|
|
3877
3885
|
};
|
|
@@ -3963,13 +3971,13 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
3963
3971
|
const { target } = props;
|
|
3964
3972
|
if (!target) {
|
|
3965
3973
|
removeScrollEvent();
|
|
3966
|
-
errLog('vxe.error.reqProp', ['target']);
|
|
3974
|
+
errLog$h('vxe.error.reqProp', ['target']);
|
|
3967
3975
|
return;
|
|
3968
3976
|
}
|
|
3969
3977
|
if (XEUtils.isString(target)) {
|
|
3970
3978
|
const tEl = document.querySelector(target);
|
|
3971
3979
|
if (!tEl) {
|
|
3972
|
-
errLog('vxe.error.errProp', [`target=${target}`, 'body']);
|
|
3980
|
+
errLog$h('vxe.error.errProp', [`target=${target}`, 'body']);
|
|
3973
3981
|
}
|
|
3974
3982
|
const { targetEl } = internalData;
|
|
3975
3983
|
if (targetEl !== tEl) {
|
|
@@ -4048,8 +4056,8 @@ var VxeBacktopComponent = defineVxeComponent({
|
|
|
4048
4056
|
});
|
|
4049
4057
|
onBeforeUnmount(() => {
|
|
4050
4058
|
removeScrollEvent();
|
|
4051
|
-
XEUtils.assign(reactData, createReactData$
|
|
4052
|
-
XEUtils.assign(internalData, createInternalData$
|
|
4059
|
+
XEUtils.assign(reactData, createReactData$f());
|
|
4060
|
+
XEUtils.assign(internalData, createInternalData$e());
|
|
4053
4061
|
});
|
|
4054
4062
|
$xeBacktop.renderVN = renderVN;
|
|
4055
4063
|
return $xeBacktop;
|
|
@@ -4412,6 +4420,18 @@ dynamicApp.use(VxeButtonGroup);
|
|
|
4412
4420
|
VxeUI.component(VxeButtonGroupComponent);
|
|
4413
4421
|
const ButtonGroup = VxeButtonGroup;
|
|
4414
4422
|
|
|
4423
|
+
function getChunkDefaultNum(selectKey) {
|
|
4424
|
+
const currDate = new Date();
|
|
4425
|
+
switch (selectKey) {
|
|
4426
|
+
case 'y': return currDate.getFullYear();
|
|
4427
|
+
case 'M': return currDate.getMonth() + 1;
|
|
4428
|
+
case 'd': return currDate.getDate();
|
|
4429
|
+
case 'H': return currDate.getHours();
|
|
4430
|
+
case 'm': return currDate.getMinutes();
|
|
4431
|
+
case 's': return currDate.getSeconds();
|
|
4432
|
+
}
|
|
4433
|
+
return 0;
|
|
4434
|
+
}
|
|
4415
4435
|
function hasTimestampValueType(valueFormat) {
|
|
4416
4436
|
return valueFormat === 'timestamp';
|
|
4417
4437
|
}
|
|
@@ -4432,18 +4452,6 @@ function handleValueFormat(type, valueFormat) {
|
|
|
4432
4452
|
}
|
|
4433
4453
|
return 'yyyy-MM-dd';
|
|
4434
4454
|
}
|
|
4435
|
-
function handleInputFormat(type, inputFormat) {
|
|
4436
|
-
if (inputFormat) {
|
|
4437
|
-
return inputFormat;
|
|
4438
|
-
}
|
|
4439
|
-
if (type === 'time') {
|
|
4440
|
-
return 'HH:mm:ss';
|
|
4441
|
-
}
|
|
4442
|
-
if (type === 'datetime') {
|
|
4443
|
-
return 'yyyy-MM-dd HH:mm:ss';
|
|
4444
|
-
}
|
|
4445
|
-
return 'yyyy-MM-dd';
|
|
4446
|
-
}
|
|
4447
4455
|
function toStringTimeDate(str) {
|
|
4448
4456
|
const rest = new Date(2e3, 0, 1);
|
|
4449
4457
|
if (str) {
|
|
@@ -4487,7 +4495,7 @@ function getDateQuarter(date) {
|
|
|
4487
4495
|
}
|
|
4488
4496
|
return 4;
|
|
4489
4497
|
}
|
|
4490
|
-
|
|
4498
|
+
function parseDateValue(val, type, options) {
|
|
4491
4499
|
const { valueFormat } = options;
|
|
4492
4500
|
if (val) {
|
|
4493
4501
|
if (type === 'time') {
|
|
@@ -4502,7 +4510,7 @@ const parseDateValue = (val, type, options) => {
|
|
|
4502
4510
|
return XEUtils.toStringDate(val, valueFormat);
|
|
4503
4511
|
}
|
|
4504
4512
|
return null;
|
|
4505
|
-
}
|
|
4513
|
+
}
|
|
4506
4514
|
const parseDateString = (val, type, options) => {
|
|
4507
4515
|
const dValue = parseDateValue(val, type, options);
|
|
4508
4516
|
return dValue ? XEUtils.toDateString(dValue, options.valueFormat) : '';
|
|
@@ -4639,10 +4647,22 @@ function getRangeDateByCode(code, val, type, options) {
|
|
|
4639
4647
|
/**
|
|
4640
4648
|
* 判断周的年份是否跨年
|
|
4641
4649
|
*/
|
|
4642
|
-
|
|
4650
|
+
function checkWeekOfsetYear(W, M) {
|
|
4643
4651
|
return `${W}` === '1' && `${M}` === '12';
|
|
4644
|
-
}
|
|
4652
|
+
}
|
|
4653
|
+
function isAllSameChar(str, char) {
|
|
4654
|
+
if (str.length === 0) {
|
|
4655
|
+
return false;
|
|
4656
|
+
}
|
|
4657
|
+
for (let i = 0; i < str.length; i++) {
|
|
4658
|
+
if (str[i] !== char) {
|
|
4659
|
+
return false;
|
|
4660
|
+
}
|
|
4661
|
+
}
|
|
4662
|
+
return true;
|
|
4663
|
+
}
|
|
4645
4664
|
|
|
4665
|
+
const { errLog: errLog$g } = createComponentLog('calendar');
|
|
4646
4666
|
const { menus: menus$2, getConfig: getConfig$2, getI18n: getI18n$1 } = VxeUI;
|
|
4647
4667
|
var VxeCalendarComponent = defineVxeComponent({
|
|
4648
4668
|
name: 'VxeCalendar',
|
|
@@ -5910,7 +5930,7 @@ var VxeCalendarComponent = defineVxeComponent({
|
|
|
5910
5930
|
const { menuConfig } = props;
|
|
5911
5931
|
const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
|
|
5912
5932
|
if (menuConfig && !VxeUIContextMenu) {
|
|
5913
|
-
errLog('vxe.error.reqComp', ['vxe-context-menu']);
|
|
5933
|
+
errLog$g('vxe.error.reqComp', ['vxe-context-menu']);
|
|
5914
5934
|
}
|
|
5915
5935
|
dateOpenPanel();
|
|
5916
5936
|
});
|
|
@@ -6692,7 +6712,7 @@ function deNodeValue$1(nodeid) {
|
|
|
6692
6712
|
return nodeid ? decodeURIComponent(`${nodeid}`) : nodeid;
|
|
6693
6713
|
}
|
|
6694
6714
|
|
|
6695
|
-
function createReactData$
|
|
6715
|
+
function createReactData$e() {
|
|
6696
6716
|
return {
|
|
6697
6717
|
scrollYLoad: false,
|
|
6698
6718
|
bodyHeight: 0,
|
|
@@ -6703,7 +6723,7 @@ function createReactData$9() {
|
|
|
6703
6723
|
items: []
|
|
6704
6724
|
};
|
|
6705
6725
|
}
|
|
6706
|
-
function createInternalData$
|
|
6726
|
+
function createInternalData$d() {
|
|
6707
6727
|
return {
|
|
6708
6728
|
resizeObserver: undefined,
|
|
6709
6729
|
fullData: [],
|
|
@@ -6746,8 +6766,8 @@ var VxeListComponent = defineVxeComponent({
|
|
|
6746
6766
|
const xID = XEUtils.uniqueId();
|
|
6747
6767
|
const browseObj = XEUtils.browse();
|
|
6748
6768
|
const { computeSize } = useSize(props);
|
|
6749
|
-
const reactData = reactive(createReactData$
|
|
6750
|
-
const internalData = createInternalData$
|
|
6769
|
+
const reactData = reactive(createReactData$e());
|
|
6770
|
+
const internalData = createInternalData$d();
|
|
6751
6771
|
const refElem = ref();
|
|
6752
6772
|
const refVirtualWrapper = ref();
|
|
6753
6773
|
const refVirtualBody = ref();
|
|
@@ -7079,8 +7099,8 @@ var VxeListComponent = defineVxeComponent({
|
|
|
7079
7099
|
resizeObserver.disconnect();
|
|
7080
7100
|
}
|
|
7081
7101
|
globalEvents.off($xeList, 'resize');
|
|
7082
|
-
XEUtils.assign(reactData, createReactData$
|
|
7083
|
-
XEUtils.assign(internalData, createInternalData$
|
|
7102
|
+
XEUtils.assign(reactData, createReactData$e());
|
|
7103
|
+
XEUtils.assign(internalData, createInternalData$d());
|
|
7084
7104
|
});
|
|
7085
7105
|
$xeList.renderVN = renderVN;
|
|
7086
7106
|
return $xeList;
|
|
@@ -7112,6 +7132,7 @@ function toFloatValueFixed(inputValue, type, digitsValue, roundingMode) {
|
|
|
7112
7132
|
}
|
|
7113
7133
|
}
|
|
7114
7134
|
|
|
7135
|
+
const { warnLog: warnLog$9 } = createComponentLog('input');
|
|
7115
7136
|
var VxeInputComponent = defineVxeComponent({
|
|
7116
7137
|
name: 'VxeInput',
|
|
7117
7138
|
props: {
|
|
@@ -9748,13 +9769,13 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9748
9769
|
onMounted(() => {
|
|
9749
9770
|
const { type } = props;
|
|
9750
9771
|
if (['date', 'time', 'datetime', 'week', 'month', 'quarter', 'year'].includes(type)) {
|
|
9751
|
-
warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-date-picker type="${type}" ... />`]);
|
|
9772
|
+
warnLog$9('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-date-picker type="${type}" ... />`]);
|
|
9752
9773
|
}
|
|
9753
9774
|
else if (['number', 'integer', 'float'].includes(type)) {
|
|
9754
|
-
warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-number-input type="${type}" ... />`]);
|
|
9775
|
+
warnLog$9('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-number-input type="${type}" ... />`]);
|
|
9755
9776
|
}
|
|
9756
9777
|
else if (['password'].includes(type)) {
|
|
9757
|
-
warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, '<vxe-password-input ... />']);
|
|
9778
|
+
warnLog$9('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, '<vxe-password-input ... />']);
|
|
9758
9779
|
}
|
|
9759
9780
|
const inputElem = refInputTarget.value;
|
|
9760
9781
|
if (inputElem) {
|
|
@@ -9786,13 +9807,14 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9786
9807
|
}
|
|
9787
9808
|
});
|
|
9788
9809
|
|
|
9810
|
+
const { errLog: errLog$f } = createComponentLog('cascader');
|
|
9789
9811
|
/**
|
|
9790
9812
|
* 生成节点的唯一主键
|
|
9791
9813
|
*/
|
|
9792
9814
|
function getNodeUniqueId$1() {
|
|
9793
9815
|
return XEUtils.uniqueId('node_');
|
|
9794
9816
|
}
|
|
9795
|
-
function createReactData$
|
|
9817
|
+
function createReactData$d() {
|
|
9796
9818
|
return {
|
|
9797
9819
|
initialized: false,
|
|
9798
9820
|
searchValue: '',
|
|
@@ -9815,7 +9837,7 @@ function createReactData$8() {
|
|
|
9815
9837
|
lazyOptFlag: 1
|
|
9816
9838
|
};
|
|
9817
9839
|
}
|
|
9818
|
-
function createInternalData$
|
|
9840
|
+
function createInternalData$c() {
|
|
9819
9841
|
return {
|
|
9820
9842
|
// hpTimeout: undefined,
|
|
9821
9843
|
listVirtualYOpts: {
|
|
@@ -9942,8 +9964,8 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
9942
9964
|
const refInpSearch = ref();
|
|
9943
9965
|
const refChunkWrapper = ref();
|
|
9944
9966
|
const refOptionPanel = ref();
|
|
9945
|
-
const reactData = reactive(createReactData$
|
|
9946
|
-
const internalData = createInternalData$
|
|
9967
|
+
const reactData = reactive(createReactData$d());
|
|
9968
|
+
const internalData = createInternalData$c();
|
|
9947
9969
|
const refMaps = {
|
|
9948
9970
|
refElem
|
|
9949
9971
|
};
|
|
@@ -11459,7 +11481,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
11459
11481
|
loadData(props.options || []);
|
|
11460
11482
|
onMounted(() => {
|
|
11461
11483
|
if (props.filterable) {
|
|
11462
|
-
errLog('vxe.error.notProp', ['filterable']);
|
|
11484
|
+
errLog$f('vxe.error.notProp', ['filterable']);
|
|
11463
11485
|
}
|
|
11464
11486
|
globalEvents.on($xeCascader, 'mousewheel', handleGlobalMousewheelEvent);
|
|
11465
11487
|
globalEvents.on($xeCascader, 'mousedown', handleGlobalMousedownEvent);
|
|
@@ -11471,7 +11493,7 @@ var VxeCascaderComponent = defineVxeComponent({
|
|
|
11471
11493
|
globalEvents.off($xeCascader, 'mousedown');
|
|
11472
11494
|
globalEvents.off($xeCascader, 'blur');
|
|
11473
11495
|
globalEvents.off($xeCascader, 'resize');
|
|
11474
|
-
XEUtils.assign(internalData, createInternalData$
|
|
11496
|
+
XEUtils.assign(internalData, createInternalData$c());
|
|
11475
11497
|
});
|
|
11476
11498
|
provide('$xeCascader', $xeCascader);
|
|
11477
11499
|
$xeCascader.renderVN = renderVN;
|
|
@@ -11804,7 +11826,10 @@ dynamicApp.use(VxeCheckboxButton);
|
|
|
11804
11826
|
VxeUI.component(VxeCheckboxButtonComponent);
|
|
11805
11827
|
const CheckboxButton = VxeCheckboxButton;
|
|
11806
11828
|
|
|
11807
|
-
function
|
|
11829
|
+
function createReactData$c() {
|
|
11830
|
+
return {};
|
|
11831
|
+
}
|
|
11832
|
+
function createInternalData$b() {
|
|
11808
11833
|
return {
|
|
11809
11834
|
// isLoaded: false
|
|
11810
11835
|
};
|
|
@@ -11843,8 +11868,8 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
11843
11868
|
const $xeForm = inject('$xeForm', null);
|
|
11844
11869
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
11845
11870
|
const xID = XEUtils.uniqueId();
|
|
11846
|
-
const reactData = reactive(
|
|
11847
|
-
const internalData = createInternalData$
|
|
11871
|
+
const reactData = reactive(createReactData$c());
|
|
11872
|
+
const internalData = createInternalData$b();
|
|
11848
11873
|
const computeIsReadonly = computed(() => {
|
|
11849
11874
|
const { readonly } = props;
|
|
11850
11875
|
if (readonly === null) {
|
|
@@ -12003,7 +12028,8 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
|
|
|
12003
12028
|
});
|
|
12004
12029
|
});
|
|
12005
12030
|
onUnmounted(() => {
|
|
12006
|
-
XEUtils.assign(
|
|
12031
|
+
XEUtils.assign(reactData, createReactData$c());
|
|
12032
|
+
XEUtils.assign(internalData, createInternalData$b());
|
|
12007
12033
|
});
|
|
12008
12034
|
provide('$xeCheckboxGroup', $xeCheckboxGroup);
|
|
12009
12035
|
$xeCheckboxGroup.renderVN = renderVN;
|
|
@@ -14745,12 +14771,12 @@ dynamicApp.use(VxeColorPicker);
|
|
|
14745
14771
|
VxeUI.component(VxeColorPickerComponent);
|
|
14746
14772
|
const ColorPicker = VxeColorPicker;
|
|
14747
14773
|
|
|
14748
|
-
function createInternalData$
|
|
14774
|
+
function createInternalData$a() {
|
|
14749
14775
|
return {
|
|
14750
14776
|
// leaveTime: null
|
|
14751
14777
|
};
|
|
14752
14778
|
}
|
|
14753
|
-
function createReactData$
|
|
14779
|
+
function createReactData$b() {
|
|
14754
14780
|
return {
|
|
14755
14781
|
visible: false,
|
|
14756
14782
|
activeOption: null,
|
|
@@ -14805,8 +14831,8 @@ var VxeContextMenuComponent = defineVxeComponent({
|
|
|
14805
14831
|
const xID = XEUtils.uniqueId();
|
|
14806
14832
|
const refElem = ref();
|
|
14807
14833
|
const { computeSize } = useSize(props);
|
|
14808
|
-
const internalData = createInternalData$
|
|
14809
|
-
const reactData = reactive(createReactData$
|
|
14834
|
+
const internalData = createInternalData$a();
|
|
14835
|
+
const reactData = reactive(createReactData$b());
|
|
14810
14836
|
const refMaps = {
|
|
14811
14837
|
refElem
|
|
14812
14838
|
};
|
|
@@ -15361,8 +15387,8 @@ var VxeContextMenuComponent = defineVxeComponent({
|
|
|
15361
15387
|
globalEvents.off($xeContextMenu, 'keydown');
|
|
15362
15388
|
globalEvents.off($xeContextMenu, 'mousedown');
|
|
15363
15389
|
globalEvents.off($xeContextMenu, 'blur');
|
|
15364
|
-
XEUtils.assign(reactData, createReactData$
|
|
15365
|
-
XEUtils.assign(internalData, createInternalData$
|
|
15390
|
+
XEUtils.assign(reactData, createReactData$b());
|
|
15391
|
+
XEUtils.assign(internalData, createInternalData$a());
|
|
15366
15392
|
});
|
|
15367
15393
|
$xeContextMenu.renderVN = renderVN;
|
|
15368
15394
|
return $xeContextMenu;
|
|
@@ -17620,6 +17646,33 @@ dynamicApp.use(VxeDatePanel);
|
|
|
17620
17646
|
VxeUI.component(VxeDatePanelComponent);
|
|
17621
17647
|
const DatePanel = VxeDatePanel;
|
|
17622
17648
|
|
|
17649
|
+
const { warnLog: warnLog$8, errLog: errLog$e } = createComponentLog('date-picker');
|
|
17650
|
+
const maskedTypes = ['year', 'month', 'date', 'datetime', 'time'];
|
|
17651
|
+
const inputMaskedKeys = ['y', 'M', 'd', 'H', 'm', 'n', 's'];
|
|
17652
|
+
const parseInputKayMaps = {};
|
|
17653
|
+
inputMaskedKeys.forEach(key => {
|
|
17654
|
+
parseInputKayMaps[key] = true;
|
|
17655
|
+
});
|
|
17656
|
+
function createReactData$a() {
|
|
17657
|
+
return {
|
|
17658
|
+
initialized: false,
|
|
17659
|
+
panelIndex: 0,
|
|
17660
|
+
visiblePanel: false,
|
|
17661
|
+
isAniVisible: false,
|
|
17662
|
+
panelStyle: {},
|
|
17663
|
+
panelPlacement: '',
|
|
17664
|
+
isActivated: false,
|
|
17665
|
+
inputValue: '',
|
|
17666
|
+
labelFlag: 0
|
|
17667
|
+
};
|
|
17668
|
+
}
|
|
17669
|
+
function createInternalData$9() {
|
|
17670
|
+
return {
|
|
17671
|
+
// hpTimeout: undefined,
|
|
17672
|
+
inputLabel: '',
|
|
17673
|
+
laseFocusMasked: 0
|
|
17674
|
+
};
|
|
17675
|
+
}
|
|
17623
17676
|
var VxeDatePickerComponent = defineVxeComponent({
|
|
17624
17677
|
name: 'VxeDatePicker',
|
|
17625
17678
|
props: {
|
|
@@ -17682,7 +17735,6 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17682
17735
|
labelFormat: String,
|
|
17683
17736
|
valueFormat: String,
|
|
17684
17737
|
timeFormat: String,
|
|
17685
|
-
inputFormat: String,
|
|
17686
17738
|
editable: {
|
|
17687
17739
|
type: Boolean,
|
|
17688
17740
|
default: true
|
|
@@ -17712,7 +17764,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17712
17764
|
type: Boolean,
|
|
17713
17765
|
default: () => getConfig$3().datePicker.autoClose
|
|
17714
17766
|
},
|
|
17715
|
-
|
|
17767
|
+
maskedConfig: Object,
|
|
17716
17768
|
prefixIcon: String,
|
|
17717
17769
|
suffixIcon: String,
|
|
17718
17770
|
placement: String,
|
|
@@ -17753,21 +17805,8 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17753
17805
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
17754
17806
|
const xID = XEUtils.uniqueId();
|
|
17755
17807
|
const { computeSize } = useSize(props);
|
|
17756
|
-
const reactData = reactive(
|
|
17757
|
-
|
|
17758
|
-
panelIndex: 0,
|
|
17759
|
-
visiblePanel: false,
|
|
17760
|
-
isAniVisible: false,
|
|
17761
|
-
panelStyle: {},
|
|
17762
|
-
panelPlacement: '',
|
|
17763
|
-
isActivated: false,
|
|
17764
|
-
inputValue: '',
|
|
17765
|
-
inputLabel: ''
|
|
17766
|
-
});
|
|
17767
|
-
const internalData = {
|
|
17768
|
-
// hpTimeout: undefined,
|
|
17769
|
-
parseInputKayMaps: {}
|
|
17770
|
-
};
|
|
17808
|
+
const reactData = reactive(createReactData$a());
|
|
17809
|
+
const internalData = createInternalData$9();
|
|
17771
17810
|
const refElem = ref();
|
|
17772
17811
|
const refInputTarget = ref();
|
|
17773
17812
|
const refInputPanel = ref();
|
|
@@ -17833,6 +17872,44 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17833
17872
|
const computeIsClearable = computed(() => {
|
|
17834
17873
|
return props.clearable;
|
|
17835
17874
|
});
|
|
17875
|
+
const computeIsDatePanelType = computed(() => {
|
|
17876
|
+
const isDateTimeType = computeIsDateTimeType.value;
|
|
17877
|
+
return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
17878
|
+
});
|
|
17879
|
+
const computeDateListValue = computed(() => {
|
|
17880
|
+
const { modelValue, type, multiple } = props;
|
|
17881
|
+
const isDatePanelType = computeIsDatePanelType.value;
|
|
17882
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
17883
|
+
if (multiple && modelValue && isDatePanelType) {
|
|
17884
|
+
return XEUtils.toValueString(modelValue).split(',').map(item => {
|
|
17885
|
+
const date = parseDateValue(item, type, {
|
|
17886
|
+
valueFormat: dateValueFormat
|
|
17887
|
+
});
|
|
17888
|
+
if (XEUtils.isValidDate(date)) {
|
|
17889
|
+
return date;
|
|
17890
|
+
}
|
|
17891
|
+
return date;
|
|
17892
|
+
});
|
|
17893
|
+
}
|
|
17894
|
+
return [];
|
|
17895
|
+
});
|
|
17896
|
+
const computeLimitMaxCount = computed(() => {
|
|
17897
|
+
return props.multiple ? XEUtils.toNumber(props.limitCount) : 0;
|
|
17898
|
+
});
|
|
17899
|
+
const computeDateMultipleValue = computed(() => {
|
|
17900
|
+
const dateListValue = computeDateListValue.value;
|
|
17901
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
17902
|
+
return dateListValue.map(date => XEUtils.toDateString(date, dateValueFormat));
|
|
17903
|
+
});
|
|
17904
|
+
const computeOverCount = computed(() => {
|
|
17905
|
+
const { multiple } = props;
|
|
17906
|
+
const limitMaxCount = computeLimitMaxCount.value;
|
|
17907
|
+
const dateMultipleValue = computeDateMultipleValue.value;
|
|
17908
|
+
if (multiple && limitMaxCount) {
|
|
17909
|
+
return dateMultipleValue.length >= limitMaxCount;
|
|
17910
|
+
}
|
|
17911
|
+
return false;
|
|
17912
|
+
});
|
|
17836
17913
|
const computeInputReadonly = computed(() => {
|
|
17837
17914
|
const { type, editable, multiple } = props;
|
|
17838
17915
|
const formReadonly = computeFormReadonly.value;
|
|
@@ -17882,9 +17959,9 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17882
17959
|
const { type, valueFormat } = props;
|
|
17883
17960
|
return handleValueFormat(type, valueFormat);
|
|
17884
17961
|
});
|
|
17885
|
-
const
|
|
17886
|
-
const
|
|
17887
|
-
return
|
|
17962
|
+
const computeDateMaskedFormat = computed(() => {
|
|
17963
|
+
const dateLabelFormat = computeDateLabelFormat.value;
|
|
17964
|
+
return dateLabelFormat;
|
|
17888
17965
|
});
|
|
17889
17966
|
const computeFirstDayOfWeek = computed(() => {
|
|
17890
17967
|
const { startDay } = props;
|
|
@@ -17906,8 +17983,13 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17906
17983
|
return dateObj.label;
|
|
17907
17984
|
}).join(', ');
|
|
17908
17985
|
});
|
|
17909
|
-
const
|
|
17910
|
-
return Object.assign({}, getConfig$3().datePicker.
|
|
17986
|
+
const computeMaskedOpts = computed(() => {
|
|
17987
|
+
return Object.assign({}, getConfig$3().datePicker.maskedConfig, props.maskedConfig);
|
|
17988
|
+
});
|
|
17989
|
+
const computeMaskChar = computed(() => {
|
|
17990
|
+
const maskedOpts = computeMaskedOpts.value;
|
|
17991
|
+
const { maskPlaceholder } = maskedOpts;
|
|
17992
|
+
return (maskPlaceholder ? ('' + maskPlaceholder)[0] : '') || '*';
|
|
17911
17993
|
});
|
|
17912
17994
|
const updateModelValue = () => {
|
|
17913
17995
|
const { modelValue } = props;
|
|
@@ -17922,6 +18004,12 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17922
18004
|
}
|
|
17923
18005
|
reactData.inputValue = val;
|
|
17924
18006
|
};
|
|
18007
|
+
const handleInputLabel = (text, isUpdate) => {
|
|
18008
|
+
internalData.inputLabel = text;
|
|
18009
|
+
if (isUpdate) {
|
|
18010
|
+
reactData.labelFlag++;
|
|
18011
|
+
}
|
|
18012
|
+
};
|
|
17925
18013
|
const triggerEvent = (evnt) => {
|
|
17926
18014
|
const { inputValue } = reactData;
|
|
17927
18015
|
dispatchEvent(evnt.type, { value: inputValue }, evnt);
|
|
@@ -17967,7 +18055,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17967
18055
|
const inputEvent = (evnt) => {
|
|
17968
18056
|
const inputElem = evnt.target;
|
|
17969
18057
|
const value = inputElem.value;
|
|
17970
|
-
|
|
18058
|
+
handleInputLabel(value, true);
|
|
17971
18059
|
dispatchEvent('input', { value }, evnt);
|
|
17972
18060
|
};
|
|
17973
18061
|
const changeEvent = (evnt) => {
|
|
@@ -17976,18 +18064,6 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
17976
18064
|
triggerEvent(evnt);
|
|
17977
18065
|
}
|
|
17978
18066
|
};
|
|
17979
|
-
const focusEvent = (evnt) => {
|
|
17980
|
-
const popupOpts = computePopupOpts.value;
|
|
17981
|
-
const { trigger } = popupOpts;
|
|
17982
|
-
reactData.isActivated = true;
|
|
17983
|
-
if (!trigger || trigger === 'default') {
|
|
17984
|
-
datePickerOpenEvent(evnt);
|
|
17985
|
-
}
|
|
17986
|
-
else if (trigger === 'icon') {
|
|
17987
|
-
hidePanel();
|
|
17988
|
-
}
|
|
17989
|
-
triggerEvent(evnt);
|
|
17990
|
-
};
|
|
17991
18067
|
const clickPrefixEvent = (evnt) => {
|
|
17992
18068
|
const isDisabled = computeIsDisabled.value;
|
|
17993
18069
|
if (!isDisabled) {
|
|
@@ -18004,6 +18080,107 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18004
18080
|
}, 350);
|
|
18005
18081
|
});
|
|
18006
18082
|
};
|
|
18083
|
+
const dateChange = (date, isReload) => {
|
|
18084
|
+
const { modelValue, multiple } = props;
|
|
18085
|
+
const isDateTimeType = computeIsDateTimeType.value;
|
|
18086
|
+
const dateValueFormat = computeDateValueFormat.value;
|
|
18087
|
+
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
18088
|
+
if (props.type === 'week') {
|
|
18089
|
+
const sWeek = XEUtils.toNumber(props.selectDay);
|
|
18090
|
+
date = XEUtils.getWhatWeek(date, 0, sWeek, firstDayOfWeek);
|
|
18091
|
+
}
|
|
18092
|
+
const inpVal = XEUtils.toDateString(date, dateValueFormat, { firstDay: firstDayOfWeek });
|
|
18093
|
+
if (multiple) {
|
|
18094
|
+
const overCount = computeOverCount.value;
|
|
18095
|
+
// 如果为多选
|
|
18096
|
+
if (isDateTimeType) {
|
|
18097
|
+
// 如果是datetime特殊类型
|
|
18098
|
+
const dateListValue = [...computeDateListValue.value];
|
|
18099
|
+
const datetimeRest = [];
|
|
18100
|
+
const eqIndex = XEUtils.findIndexOf(dateListValue, val => XEUtils.isDateSame(date, val, 'yyyyMMdd'));
|
|
18101
|
+
if (eqIndex === -1) {
|
|
18102
|
+
if (overCount) {
|
|
18103
|
+
// 如果超出最大多选数量
|
|
18104
|
+
return;
|
|
18105
|
+
}
|
|
18106
|
+
dateListValue.push(date);
|
|
18107
|
+
}
|
|
18108
|
+
else {
|
|
18109
|
+
dateListValue.splice(eqIndex, 1);
|
|
18110
|
+
}
|
|
18111
|
+
dateListValue.forEach(item => {
|
|
18112
|
+
if (item) {
|
|
18113
|
+
datetimeRest.push(item);
|
|
18114
|
+
}
|
|
18115
|
+
});
|
|
18116
|
+
handleChange(datetimeRest.map(date => XEUtils.toDateString(date, dateValueFormat)).join(','), { type: 'update' });
|
|
18117
|
+
}
|
|
18118
|
+
else {
|
|
18119
|
+
const dateMultipleValue = computeDateMultipleValue.value;
|
|
18120
|
+
// 如果是日期类型
|
|
18121
|
+
if (dateMultipleValue.some(val => XEUtils.isEqual(val, inpVal))) {
|
|
18122
|
+
handleChange(dateMultipleValue.filter(val => !XEUtils.isEqual(val, inpVal)).join(','), { type: 'update' });
|
|
18123
|
+
}
|
|
18124
|
+
else {
|
|
18125
|
+
if (overCount) {
|
|
18126
|
+
// 如果超出最大多选数量
|
|
18127
|
+
return;
|
|
18128
|
+
}
|
|
18129
|
+
handleChange(dateMultipleValue.concat([inpVal]).join(','), { type: 'update' });
|
|
18130
|
+
}
|
|
18131
|
+
}
|
|
18132
|
+
}
|
|
18133
|
+
else {
|
|
18134
|
+
// 如果为单选
|
|
18135
|
+
if (!XEUtils.isEqual(modelValue, inpVal)) {
|
|
18136
|
+
handleChange(inpVal, { type: 'update' });
|
|
18137
|
+
}
|
|
18138
|
+
}
|
|
18139
|
+
};
|
|
18140
|
+
const dateRevert = () => {
|
|
18141
|
+
const panelLabel = computePanelLabel.value;
|
|
18142
|
+
handleInputLabel(panelLabel, true);
|
|
18143
|
+
};
|
|
18144
|
+
const afterCheckValue = (inpVal) => {
|
|
18145
|
+
const { type } = props;
|
|
18146
|
+
const { inputLabel } = internalData;
|
|
18147
|
+
const dateLabelFormat = computeDateLabelFormat.value;
|
|
18148
|
+
if (!inpVal) {
|
|
18149
|
+
handleChange('', { type: 'check' });
|
|
18150
|
+
return;
|
|
18151
|
+
}
|
|
18152
|
+
let inpDateVal = parseDateValue(inpVal, type, {
|
|
18153
|
+
valueFormat: dateLabelFormat
|
|
18154
|
+
});
|
|
18155
|
+
if (!XEUtils.isValidDate(inpDateVal)) {
|
|
18156
|
+
dateRevert();
|
|
18157
|
+
return;
|
|
18158
|
+
}
|
|
18159
|
+
if (type === 'time') {
|
|
18160
|
+
inpDateVal = XEUtils.toDateString(inpDateVal, dateLabelFormat);
|
|
18161
|
+
if (inputLabel !== inpDateVal) {
|
|
18162
|
+
handleChange(inpDateVal, { type: 'check' });
|
|
18163
|
+
}
|
|
18164
|
+
handleInputLabel(inpDateVal, true);
|
|
18165
|
+
return;
|
|
18166
|
+
}
|
|
18167
|
+
let isChange = false;
|
|
18168
|
+
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
18169
|
+
if (type === 'datetime') {
|
|
18170
|
+
const dateValue = reactData.inputValue;
|
|
18171
|
+
if (inpVal !== XEUtils.toDateString(dateValue, dateLabelFormat) || inpVal !== XEUtils.toDateString(inpDateVal, dateLabelFormat)) {
|
|
18172
|
+
isChange = true;
|
|
18173
|
+
}
|
|
18174
|
+
}
|
|
18175
|
+
else {
|
|
18176
|
+
isChange = true;
|
|
18177
|
+
}
|
|
18178
|
+
const label = XEUtils.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
|
|
18179
|
+
handleInputLabel(label, true);
|
|
18180
|
+
if (isChange) {
|
|
18181
|
+
dateChange(inpDateVal);
|
|
18182
|
+
}
|
|
18183
|
+
};
|
|
18007
18184
|
const clearValueEvent = (evnt, value) => {
|
|
18008
18185
|
const isDatePickerType = computeIsDatePickerType.value;
|
|
18009
18186
|
if (isDatePickerType) {
|
|
@@ -18019,29 +18196,296 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18019
18196
|
dispatchEvent('suffix-click', { value: inputValue }, evnt);
|
|
18020
18197
|
}
|
|
18021
18198
|
};
|
|
18022
|
-
const handleArrowInputDate = (evnt, isUpArrow) => {
|
|
18199
|
+
const handleArrowInputDate = (evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow) => {
|
|
18200
|
+
const { type, multiple } = props;
|
|
18201
|
+
if (multiple) {
|
|
18202
|
+
return;
|
|
18203
|
+
}
|
|
18204
|
+
const targetElem = refInputTarget.value;
|
|
18205
|
+
if (!targetElem) {
|
|
18206
|
+
return;
|
|
18207
|
+
}
|
|
18208
|
+
const inpValue = targetElem.value;
|
|
18209
|
+
if (!inpValue) {
|
|
18210
|
+
return;
|
|
18211
|
+
}
|
|
18212
|
+
const dateMaskedFormat = computeDateMaskedFormat.value;
|
|
18213
|
+
const dateLabelFormat = computeDateLabelFormat.value;
|
|
18214
|
+
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
18215
|
+
const maskChar = computeMaskChar.value;
|
|
18216
|
+
const selectionStart = targetElem.selectionStart || 0;
|
|
18217
|
+
let selectKey = dateMaskedFormat[selectionStart];
|
|
18218
|
+
if (!parseInputKayMaps[selectKey]) {
|
|
18219
|
+
selectKey = dateMaskedFormat[selectionStart - 1];
|
|
18220
|
+
}
|
|
18221
|
+
const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
|
|
18222
|
+
if (!skRest) {
|
|
18223
|
+
return;
|
|
18224
|
+
}
|
|
18225
|
+
if (isUpArrow || isDwArrow) {
|
|
18226
|
+
const chunkFormat = skRest[0] || '';
|
|
18227
|
+
const chunkStartIndex = skRest.index || 0;
|
|
18228
|
+
const chunkEndIndex = chunkStartIndex + chunkFormat.length;
|
|
18229
|
+
const chunkValue = inpValue.slice(chunkStartIndex, chunkEndIndex);
|
|
18230
|
+
if (parseInputKayMaps[selectKey]) {
|
|
18231
|
+
const chunkNum = (isAllSameChar(chunkValue, maskChar) ? getChunkDefaultNum(selectKey) : XEUtils.toNumber(chunkValue)) + (isUpArrow ? 1 : -1);
|
|
18232
|
+
const restValue = inpValue.slice(0, chunkStartIndex) + XEUtils.padStart(chunkNum, chunkFormat.length, '0') + inpValue.slice(chunkEndIndex);
|
|
18233
|
+
evnt.preventDefault();
|
|
18234
|
+
if (restValue.indexOf(maskChar) === -1) {
|
|
18235
|
+
// 解析日期
|
|
18236
|
+
const inpDateVal = parseDateValue(restValue, type, {
|
|
18237
|
+
valueFormat: dateLabelFormat
|
|
18238
|
+
});
|
|
18239
|
+
if (XEUtils.isValidDate(inpDateVal)) {
|
|
18240
|
+
const label = XEUtils.toDateString(inpDateVal, dateLabelFormat, { firstDay: firstDayOfWeek });
|
|
18241
|
+
targetElem.value = label;
|
|
18242
|
+
handleInputLabel(label, false);
|
|
18243
|
+
}
|
|
18244
|
+
}
|
|
18245
|
+
else {
|
|
18246
|
+
targetElem.value = restValue;
|
|
18247
|
+
handleInputLabel(restValue, false);
|
|
18248
|
+
}
|
|
18249
|
+
}
|
|
18250
|
+
targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
|
|
18251
|
+
}
|
|
18252
|
+
else if (isLtArrow || isRtArrow) {
|
|
18253
|
+
const currKeyIndex = inputMaskedKeys.indexOf(selectKey);
|
|
18254
|
+
if (currKeyIndex > -1) {
|
|
18255
|
+
const allMaskedKeys = XEUtils.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g')) || [], fullKey => fullKey[0]);
|
|
18256
|
+
const currIndex = XEUtils.findIndexOf(allMaskedKeys, key => selectKey === key[0]);
|
|
18257
|
+
const targetFormatKey = isLtArrow ? (allMaskedKeys[currIndex - 1] || allMaskedKeys[0]) : (allMaskedKeys[currIndex + 1] || allMaskedKeys[allMaskedKeys.length - 1]);
|
|
18258
|
+
const targetKey = targetFormatKey ? targetFormatKey[0] : '';
|
|
18259
|
+
const sktRest = dateMaskedFormat.match(new RegExp(targetKey + '+'));
|
|
18260
|
+
if (sktRest) {
|
|
18261
|
+
evnt.preventDefault();
|
|
18262
|
+
const mtStartIndex = sktRest.index || 0;
|
|
18263
|
+
const mtEndIndex = mtStartIndex + sktRest[0].length;
|
|
18264
|
+
targetElem.setSelectionRange(mtStartIndex, mtEndIndex);
|
|
18265
|
+
}
|
|
18266
|
+
}
|
|
18267
|
+
}
|
|
18268
|
+
internalData.isTriggerMasked = true;
|
|
18269
|
+
};
|
|
18270
|
+
const handleMaskedInputDate = (evnt) => {
|
|
18023
18271
|
const { multiple } = props;
|
|
18024
18272
|
if (multiple) {
|
|
18025
18273
|
return;
|
|
18026
18274
|
}
|
|
18027
|
-
const
|
|
18028
|
-
if (!
|
|
18275
|
+
const targetElem = refInputTarget.value;
|
|
18276
|
+
if (!targetElem) {
|
|
18277
|
+
return;
|
|
18278
|
+
}
|
|
18279
|
+
const isControlKey = hasControlKey(evnt);
|
|
18280
|
+
if (isControlKey) {
|
|
18281
|
+
return;
|
|
18282
|
+
}
|
|
18283
|
+
evnt.preventDefault();
|
|
18284
|
+
const eKey = evnt.key;
|
|
18285
|
+
const isDeleleKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.DELETE);
|
|
18286
|
+
const isBackspaceKey = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.BACKSPACE);
|
|
18287
|
+
const isNumKey = eKey >= '0' && eKey <= '9';
|
|
18288
|
+
const numKey = isNumKey ? evnt.key : '';
|
|
18289
|
+
if (!(isDeleleKey || isBackspaceKey || isNumKey)) {
|
|
18290
|
+
return;
|
|
18291
|
+
}
|
|
18292
|
+
const { isTriggerMasked } = internalData;
|
|
18293
|
+
const dateMaskedFormat = computeDateMaskedFormat.value;
|
|
18294
|
+
const maskChar = computeMaskChar.value;
|
|
18295
|
+
let inpValue = targetElem.value || dateMaskedFormat;
|
|
18296
|
+
const selectionStart = targetElem.selectionStart || 0;
|
|
18297
|
+
const selectionEnd = targetElem.selectionEnd || 0;
|
|
18298
|
+
let selectKey = dateMaskedFormat[selectionStart];
|
|
18299
|
+
if (!parseInputKayMaps[selectKey]) {
|
|
18300
|
+
selectKey = dateMaskedFormat[selectionStart - 1];
|
|
18301
|
+
}
|
|
18302
|
+
const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
|
|
18303
|
+
if (!skRest) {
|
|
18304
|
+
return;
|
|
18305
|
+
}
|
|
18306
|
+
const allMaskedKeys = XEUtils.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g')) || [], fullKey => fullKey[0]);
|
|
18307
|
+
const chunkFormat = skRest[0] || '';
|
|
18308
|
+
const chunkStartIndex = skRest.index || 0;
|
|
18309
|
+
const chunkEndIndex = chunkStartIndex + chunkFormat.length;
|
|
18310
|
+
const currKeyIndex = allMaskedKeys.indexOf(selectKey);
|
|
18311
|
+
// 全选 | 如果无效字符
|
|
18312
|
+
const isAllSelected = !selectionStart && selectionEnd === inpValue.length;
|
|
18313
|
+
const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
|
|
18314
|
+
if (isAllSelected || isNotMasked) {
|
|
18315
|
+
inpValue = dateMaskedFormat;
|
|
18316
|
+
}
|
|
18317
|
+
let chunkValue = isDeleleKey ? '' : inpValue.slice(chunkStartIndex, chunkEndIndex);
|
|
18318
|
+
const chunkNums = (chunkValue.match(/\d/g) || []);
|
|
18319
|
+
const chunkNumList = isTriggerMasked && !isBackspaceKey ? [] : chunkNums.slice(0);
|
|
18320
|
+
if (isNumKey) {
|
|
18321
|
+
chunkNumList.push(numKey);
|
|
18322
|
+
}
|
|
18323
|
+
else if (isBackspaceKey) {
|
|
18324
|
+
chunkNumList.pop();
|
|
18325
|
+
}
|
|
18326
|
+
chunkValue = chunkNumList.join('').padEnd(chunkFormat.length, maskChar);
|
|
18327
|
+
let restValue = inpValue.slice(0, chunkStartIndex) + chunkValue + inpValue.slice(chunkEndIndex);
|
|
18328
|
+
restValue = restValue.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
|
|
18329
|
+
targetElem.value = restValue;
|
|
18330
|
+
handleInputLabel(restValue, false);
|
|
18331
|
+
// 如果是全选/删除
|
|
18332
|
+
if (isAllSelected) {
|
|
18333
|
+
if (isBackspaceKey || isDeleleKey) {
|
|
18334
|
+
const firstMaskedKeys = allMaskedKeys[0];
|
|
18335
|
+
const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
|
|
18336
|
+
if (firstSkRest) {
|
|
18337
|
+
const firstChunkFormat = firstSkRest[0];
|
|
18338
|
+
targetElem.setSelectionRange(0, firstChunkFormat.length);
|
|
18339
|
+
internalData.isTriggerMasked = true;
|
|
18340
|
+
return;
|
|
18341
|
+
}
|
|
18342
|
+
}
|
|
18343
|
+
}
|
|
18344
|
+
else {
|
|
18345
|
+
if (isBackspaceKey && !chunkNums.length) {
|
|
18346
|
+
// 回退到上一个数字块
|
|
18347
|
+
for (let i = currKeyIndex - 1; i >= 0; i--) {
|
|
18348
|
+
const prveChunkKey = allMaskedKeys[i];
|
|
18349
|
+
const prveSkRest = dateMaskedFormat.match(new RegExp(`${prveChunkKey}+`));
|
|
18350
|
+
if (prveSkRest) {
|
|
18351
|
+
const prveChunkFormat = prveSkRest[0];
|
|
18352
|
+
const prveChunkStartIndex = prveSkRest.index || 0;
|
|
18353
|
+
const prveChunkEndIndex = prveChunkStartIndex + prveChunkFormat.length;
|
|
18354
|
+
let prveChunkValue = restValue.slice(prveChunkStartIndex, prveChunkEndIndex);
|
|
18355
|
+
const prveChunkNums = (prveChunkValue.match(/\d/g) || []);
|
|
18356
|
+
if (prveChunkNums.length) {
|
|
18357
|
+
prveChunkNums.pop();
|
|
18358
|
+
prveChunkValue = prveChunkNums.join('').padEnd(prveChunkFormat.length, maskChar);
|
|
18359
|
+
restValue = restValue.slice(0, prveChunkStartIndex) + prveChunkValue + restValue.slice(prveChunkEndIndex);
|
|
18360
|
+
targetElem.value = restValue;
|
|
18361
|
+
handleInputLabel(restValue, false);
|
|
18362
|
+
targetElem.setSelectionRange(prveChunkStartIndex, prveChunkEndIndex);
|
|
18363
|
+
return;
|
|
18364
|
+
}
|
|
18365
|
+
}
|
|
18366
|
+
}
|
|
18367
|
+
const firstMaskedKeys = allMaskedKeys[0];
|
|
18368
|
+
const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
|
|
18369
|
+
if (firstSkRest) {
|
|
18370
|
+
const firstChunkFormat = firstSkRest[0];
|
|
18371
|
+
restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
|
|
18372
|
+
targetElem.value = restValue;
|
|
18373
|
+
handleInputLabel(restValue, false);
|
|
18374
|
+
targetElem.setSelectionRange(0, firstChunkFormat.length);
|
|
18375
|
+
internalData.isTriggerMasked = true;
|
|
18376
|
+
return;
|
|
18377
|
+
}
|
|
18378
|
+
return;
|
|
18379
|
+
}
|
|
18380
|
+
}
|
|
18381
|
+
let maskStartIndex = skRest.index || 0;
|
|
18382
|
+
let maskEndIndex = maskStartIndex + skRest[0].length;
|
|
18383
|
+
// 如果输入完成,跳转下一个
|
|
18384
|
+
if (chunkNumList.length >= chunkValue.length) {
|
|
18385
|
+
const nextKeys = allMaskedKeys.slice(currKeyIndex + 1);
|
|
18386
|
+
if (currKeyIndex > -1) {
|
|
18387
|
+
const nextRest = nextKeys.length ? dateMaskedFormat.match(new RegExp(`(${nextKeys.join('|')})+`)) : null;
|
|
18388
|
+
// 如果当前数字块已输入,则跳转下一个数字块
|
|
18389
|
+
if (nextRest) {
|
|
18390
|
+
maskStartIndex = nextRest.index || 0;
|
|
18391
|
+
maskEndIndex = maskStartIndex + nextRest[0].length;
|
|
18392
|
+
targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
|
|
18393
|
+
}
|
|
18394
|
+
else {
|
|
18395
|
+
targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
|
|
18396
|
+
}
|
|
18397
|
+
}
|
|
18398
|
+
internalData.isTriggerMasked = true;
|
|
18399
|
+
return;
|
|
18400
|
+
}
|
|
18401
|
+
targetElem.setSelectionRange(maskStartIndex, maskEndIndex);
|
|
18402
|
+
internalData.isTriggerMasked = false;
|
|
18403
|
+
};
|
|
18404
|
+
const handleMaskedSelectedDate = (evnt, isFocus) => {
|
|
18405
|
+
const { type, multiple, modelValue } = props;
|
|
18406
|
+
if (multiple) {
|
|
18407
|
+
return;
|
|
18408
|
+
}
|
|
18409
|
+
if (!maskedTypes.includes(type)) {
|
|
18029
18410
|
return;
|
|
18030
18411
|
}
|
|
18031
18412
|
const targetElem = refInputTarget.value;
|
|
18032
18413
|
if (!targetElem) {
|
|
18033
18414
|
return;
|
|
18034
18415
|
}
|
|
18035
|
-
const {
|
|
18036
|
-
|
|
18416
|
+
const { laseFocusMasked } = internalData;
|
|
18417
|
+
if (laseFocusMasked && Date.now() - laseFocusMasked < 100) {
|
|
18418
|
+
return;
|
|
18419
|
+
}
|
|
18420
|
+
const dateMaskedFormat = computeDateMaskedFormat.value;
|
|
18421
|
+
const maskChar = computeMaskChar.value;
|
|
18037
18422
|
const selectionStart = targetElem.selectionStart || 0;
|
|
18038
|
-
|
|
18423
|
+
const selectionEnd = targetElem.selectionEnd || 0;
|
|
18424
|
+
const inpValue = targetElem.value;
|
|
18425
|
+
const allMaskedKeys = XEUtils.map(dateMaskedFormat.match(new RegExp(`(${inputMaskedKeys.join('|')})+`, 'g')) || [], fullKey => fullKey[0]);
|
|
18426
|
+
// 如果为空
|
|
18427
|
+
if (!inpValue) {
|
|
18428
|
+
let restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
|
|
18429
|
+
// 还原值
|
|
18430
|
+
if (isFocus && modelValue) {
|
|
18431
|
+
const chunkNums = (('' + XEUtils.toNumber(modelValue)).match(/\d/g) || []);
|
|
18432
|
+
let useNumIndex = 0;
|
|
18433
|
+
restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), (txt) => chunkNums[useNumIndex++] || txt);
|
|
18434
|
+
}
|
|
18435
|
+
const firstMaskedKeys = allMaskedKeys[0];
|
|
18436
|
+
const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
|
|
18437
|
+
if (firstSkRest) {
|
|
18438
|
+
evnt.preventDefault();
|
|
18439
|
+
const firstChunkFormat = firstSkRest[0];
|
|
18440
|
+
targetElem.value = restValue;
|
|
18441
|
+
handleInputLabel(restValue, false);
|
|
18442
|
+
targetElem.setSelectionRange(0, firstChunkFormat.length);
|
|
18443
|
+
internalData.laseFocusMasked = Date.now();
|
|
18444
|
+
return;
|
|
18445
|
+
}
|
|
18446
|
+
}
|
|
18447
|
+
// 全选 | 如果无效字符
|
|
18448
|
+
const isAllSelected = !selectionStart && selectionEnd === inpValue.length;
|
|
18449
|
+
const isNotMasked = inpValue && inpValue.length !== dateMaskedFormat.length;
|
|
18450
|
+
if (isAllSelected || isNotMasked) {
|
|
18451
|
+
let restValue = '';
|
|
18452
|
+
// 还原值
|
|
18453
|
+
if (isNotMasked && inpValue) {
|
|
18454
|
+
const chunkNums = inpValue.match(/\d/g) || [];
|
|
18455
|
+
let useNumIndex = 0;
|
|
18456
|
+
restValue = dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), () => chunkNums[useNumIndex++] || maskChar);
|
|
18457
|
+
}
|
|
18458
|
+
else {
|
|
18459
|
+
dateMaskedFormat.replace(new RegExp(`(${inputMaskedKeys.join('|')})`, 'g'), maskChar);
|
|
18460
|
+
}
|
|
18461
|
+
const firstMaskedKeys = allMaskedKeys[0];
|
|
18462
|
+
const firstSkRest = dateMaskedFormat.match(new RegExp(`${firstMaskedKeys}+`));
|
|
18463
|
+
if (firstSkRest) {
|
|
18464
|
+
evnt.preventDefault();
|
|
18465
|
+
const firstChunkFormat = firstSkRest[0];
|
|
18466
|
+
targetElem.value = restValue;
|
|
18467
|
+
handleInputLabel(restValue, false);
|
|
18468
|
+
targetElem.setSelectionRange(0, firstChunkFormat.length);
|
|
18469
|
+
internalData.laseFocusMasked = Date.now();
|
|
18470
|
+
return;
|
|
18471
|
+
}
|
|
18472
|
+
}
|
|
18473
|
+
// 是否选择数字块
|
|
18474
|
+
let selectKey = dateMaskedFormat[selectionStart];
|
|
18039
18475
|
if (!parseInputKayMaps[selectKey]) {
|
|
18040
|
-
selectKey =
|
|
18476
|
+
selectKey = dateMaskedFormat[selectionStart - 1];
|
|
18041
18477
|
}
|
|
18042
|
-
|
|
18043
|
-
|
|
18044
|
-
|
|
18478
|
+
if (selectKey) {
|
|
18479
|
+
evnt.preventDefault();
|
|
18480
|
+
const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
|
|
18481
|
+
if (skRest) {
|
|
18482
|
+
const chunkFormat = skRest[0] || '';
|
|
18483
|
+
const chunkStartIndex = skRest.index || 0;
|
|
18484
|
+
const chunkEndIndex = chunkStartIndex + chunkFormat.length;
|
|
18485
|
+
targetElem.setSelectionRange(chunkStartIndex, chunkEndIndex);
|
|
18486
|
+
internalData.isTriggerMasked = true;
|
|
18487
|
+
internalData.laseFocusMasked = Date.now();
|
|
18488
|
+
}
|
|
18045
18489
|
}
|
|
18046
18490
|
};
|
|
18047
18491
|
const blurEvent = (evnt) => {
|
|
@@ -18053,10 +18497,14 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18053
18497
|
handleChange(value, evnt);
|
|
18054
18498
|
}
|
|
18055
18499
|
if (!reactData.visiblePanel) {
|
|
18500
|
+
const { inputLabel } = internalData;
|
|
18056
18501
|
reactData.isActivated = false;
|
|
18057
18502
|
// 未打开面板时才校验
|
|
18058
18503
|
if ($datePanel) {
|
|
18059
|
-
$datePanel.checkValue(
|
|
18504
|
+
$datePanel.checkValue(inputLabel);
|
|
18505
|
+
}
|
|
18506
|
+
else {
|
|
18507
|
+
afterCheckValue(inputLabel);
|
|
18060
18508
|
}
|
|
18061
18509
|
}
|
|
18062
18510
|
dispatchEvent('blur', { value }, evnt);
|
|
@@ -18065,13 +18513,80 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18065
18513
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
18066
18514
|
}
|
|
18067
18515
|
};
|
|
18516
|
+
const focusEvent = (evnt) => {
|
|
18517
|
+
const { multiple, editable, maskedConfig } = props;
|
|
18518
|
+
const maskedOpts = computeMaskedOpts.value;
|
|
18519
|
+
const popupOpts = computePopupOpts.value;
|
|
18520
|
+
const { trigger } = popupOpts;
|
|
18521
|
+
reactData.isActivated = true;
|
|
18522
|
+
if (!trigger || trigger === 'default') {
|
|
18523
|
+
datePickerOpenEvent(evnt);
|
|
18524
|
+
setTimeout(() => {
|
|
18525
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
18526
|
+
handleMaskedSelectedDate(evnt, true);
|
|
18527
|
+
}
|
|
18528
|
+
}, 15);
|
|
18529
|
+
}
|
|
18530
|
+
else if (trigger === 'icon') {
|
|
18531
|
+
hidePanel();
|
|
18532
|
+
setTimeout(() => {
|
|
18533
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
18534
|
+
handleMaskedSelectedDate(evnt, true);
|
|
18535
|
+
}
|
|
18536
|
+
}, 15);
|
|
18537
|
+
}
|
|
18538
|
+
else {
|
|
18539
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
18540
|
+
handleMaskedSelectedDate(evnt, true);
|
|
18541
|
+
}
|
|
18542
|
+
}
|
|
18543
|
+
triggerEvent(evnt);
|
|
18544
|
+
};
|
|
18545
|
+
const clickEvent = (evnt) => {
|
|
18546
|
+
const { editable, maskedConfig } = props;
|
|
18547
|
+
const maskedOpts = computeMaskedOpts.value;
|
|
18548
|
+
if (editable && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
18549
|
+
handleMaskedSelectedDate(evnt);
|
|
18550
|
+
}
|
|
18551
|
+
triggerEvent(evnt);
|
|
18552
|
+
};
|
|
18068
18553
|
const keydownEvent = (evnt) => {
|
|
18069
|
-
const {
|
|
18070
|
-
const
|
|
18554
|
+
const { type, editable, maskedConfig } = props;
|
|
18555
|
+
const { visiblePanel } = reactData;
|
|
18556
|
+
const maskedOpts = computeMaskedOpts.value;
|
|
18071
18557
|
const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
|
|
18072
18558
|
const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN);
|
|
18073
|
-
|
|
18074
|
-
|
|
18559
|
+
const isLtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_LEFT);
|
|
18560
|
+
const isRtArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_RIGHT);
|
|
18561
|
+
const isEnter = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ENTER);
|
|
18562
|
+
if (editable) {
|
|
18563
|
+
if (isEnter) {
|
|
18564
|
+
const $datePanel = refDatePanel.value;
|
|
18565
|
+
const { inputLabel } = internalData;
|
|
18566
|
+
const targetElem = refInputTarget.value;
|
|
18567
|
+
if (visiblePanel) {
|
|
18568
|
+
hidePanel();
|
|
18569
|
+
}
|
|
18570
|
+
if ($datePanel) {
|
|
18571
|
+
$datePanel.checkValue(inputLabel);
|
|
18572
|
+
}
|
|
18573
|
+
else {
|
|
18574
|
+
afterCheckValue(inputLabel);
|
|
18575
|
+
}
|
|
18576
|
+
if (targetElem) {
|
|
18577
|
+
targetElem.blur();
|
|
18578
|
+
}
|
|
18579
|
+
}
|
|
18580
|
+
else if (maskedTypes.includes(type)) {
|
|
18581
|
+
if (isEnableConf(maskedConfig) || maskedOpts.enabled) {
|
|
18582
|
+
if (maskedOpts.isArrow && (isUpArrow || isDwArrow || isLtArrow || isRtArrow)) {
|
|
18583
|
+
handleArrowInputDate(evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow);
|
|
18584
|
+
}
|
|
18585
|
+
else if (maskedOpts.isMasked) {
|
|
18586
|
+
handleMaskedInputDate(evnt);
|
|
18587
|
+
}
|
|
18588
|
+
}
|
|
18589
|
+
}
|
|
18075
18590
|
}
|
|
18076
18591
|
triggerEvent(evnt);
|
|
18077
18592
|
};
|
|
@@ -18100,7 +18615,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18100
18615
|
dispatchEvent('confirm', params, params.$event);
|
|
18101
18616
|
};
|
|
18102
18617
|
const panelRevertEvent = (params) => {
|
|
18103
|
-
|
|
18618
|
+
handleInputLabel(params.label, true);
|
|
18104
18619
|
};
|
|
18105
18620
|
// 全局事件
|
|
18106
18621
|
const handleGlobalMousedownEvent = (evnt) => {
|
|
@@ -18110,25 +18625,34 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18110
18625
|
const panelWrapperElem = refPanelWrapper.value;
|
|
18111
18626
|
const isDisabled = computeIsDisabled.value;
|
|
18112
18627
|
if (!isDisabled && isActivated) {
|
|
18113
|
-
|
|
18114
|
-
if (
|
|
18628
|
+
const currActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelWrapperElem).flag;
|
|
18629
|
+
if (currActivated !== isActivated) {
|
|
18630
|
+
reactData.isActivated = currActivated;
|
|
18631
|
+
}
|
|
18632
|
+
if (!currActivated) {
|
|
18115
18633
|
if (visiblePanel) {
|
|
18116
18634
|
hidePanel();
|
|
18635
|
+
const { inputLabel } = internalData;
|
|
18117
18636
|
if ($datePanel) {
|
|
18118
|
-
$datePanel.checkValue(
|
|
18637
|
+
$datePanel.checkValue(inputLabel);
|
|
18638
|
+
}
|
|
18639
|
+
else {
|
|
18640
|
+
afterCheckValue(inputLabel);
|
|
18119
18641
|
}
|
|
18120
18642
|
}
|
|
18121
18643
|
}
|
|
18122
18644
|
}
|
|
18123
18645
|
};
|
|
18124
18646
|
const handleGlobalKeydownEvent = (evnt) => {
|
|
18125
|
-
const { visiblePanel } = reactData;
|
|
18647
|
+
const { isActivated, visiblePanel } = reactData;
|
|
18126
18648
|
const isDisabled = computeIsDisabled.value;
|
|
18127
18649
|
if (!isDisabled) {
|
|
18128
18650
|
const isTab = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.TAB);
|
|
18129
18651
|
const isEsc = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ESCAPE);
|
|
18130
18652
|
if (isTab) {
|
|
18131
|
-
|
|
18653
|
+
if (isActivated) {
|
|
18654
|
+
reactData.isActivated = false;
|
|
18655
|
+
}
|
|
18132
18656
|
}
|
|
18133
18657
|
if (visiblePanel) {
|
|
18134
18658
|
if (isEsc || isTab) {
|
|
@@ -18163,7 +18687,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18163
18687
|
}
|
|
18164
18688
|
if (visiblePanel || isActivated) {
|
|
18165
18689
|
if ($datePanel) {
|
|
18166
|
-
$datePanel.checkValue(
|
|
18690
|
+
$datePanel.checkValue(internalData.inputLabel);
|
|
18167
18691
|
}
|
|
18168
18692
|
const targetElem = refInputTarget.value;
|
|
18169
18693
|
if (targetElem) {
|
|
@@ -18255,9 +18779,6 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18255
18779
|
}
|
|
18256
18780
|
}
|
|
18257
18781
|
};
|
|
18258
|
-
const clickEvent = (evnt) => {
|
|
18259
|
-
triggerEvent(evnt);
|
|
18260
|
-
};
|
|
18261
18782
|
const handleShortcutEvent = ({ option, $event }) => {
|
|
18262
18783
|
const { type } = props;
|
|
18263
18784
|
const { inputValue } = reactData;
|
|
@@ -18296,7 +18817,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18296
18817
|
break;
|
|
18297
18818
|
}
|
|
18298
18819
|
default:
|
|
18299
|
-
errLog('vxe.error.notCommands', [
|
|
18820
|
+
errLog$e('vxe.error.notCommands', [code]);
|
|
18300
18821
|
break;
|
|
18301
18822
|
}
|
|
18302
18823
|
}
|
|
@@ -18581,7 +19102,8 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18581
19102
|
};
|
|
18582
19103
|
const renderVN = () => {
|
|
18583
19104
|
const { className, type, name, autoComplete } = props;
|
|
18584
|
-
const { inputValue,
|
|
19105
|
+
const { inputValue, visiblePanel, isActivated, labelFlag } = reactData;
|
|
19106
|
+
const { inputLabel } = internalData;
|
|
18585
19107
|
const vSize = computeSize.value;
|
|
18586
19108
|
const isDisabled = computeIsDisabled.value;
|
|
18587
19109
|
const formReadonly = computeFormReadonly.value;
|
|
@@ -18617,7 +19139,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18617
19139
|
h('input', {
|
|
18618
19140
|
ref: refInputTarget,
|
|
18619
19141
|
class: 'vxe-date-picker--inner',
|
|
18620
|
-
value: inputLabel,
|
|
19142
|
+
value: labelFlag ? inputLabel : '',
|
|
18621
19143
|
name,
|
|
18622
19144
|
type: 'text',
|
|
18623
19145
|
placeholder: inpPlaceholder,
|
|
@@ -18639,7 +19161,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18639
19161
|
]);
|
|
18640
19162
|
};
|
|
18641
19163
|
watch(computePanelLabel, (val) => {
|
|
18642
|
-
|
|
19164
|
+
handleInputLabel(val, true);
|
|
18643
19165
|
});
|
|
18644
19166
|
watch(() => props.modelValue, () => {
|
|
18645
19167
|
updateModelValue();
|
|
@@ -18652,13 +19174,15 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18652
19174
|
globalEvents.on($xeDatePicker, 'resize', handleGlobalResizeEvent);
|
|
18653
19175
|
});
|
|
18654
19176
|
onMounted(() => {
|
|
18655
|
-
const {
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
|
|
18659
|
-
|
|
18660
|
-
|
|
18661
|
-
|
|
19177
|
+
const { type, multiple, maskedConfig } = props;
|
|
19178
|
+
if (isEnableConf(maskedConfig)) {
|
|
19179
|
+
if (multiple) {
|
|
19180
|
+
errLog$e('vxe.error.notSupportProp', ['multiple', 'control-config.enabled=true', 'control-config.enabled=false']);
|
|
19181
|
+
}
|
|
19182
|
+
if (!maskedTypes.includes(type)) {
|
|
19183
|
+
warnLog$8('vxe.error.notSupportProp', ['control-config.enabled=true', `type=${type}`, `type=${maskedTypes.join('|')}`]);
|
|
19184
|
+
}
|
|
19185
|
+
}
|
|
18662
19186
|
});
|
|
18663
19187
|
onUnmounted(() => {
|
|
18664
19188
|
globalEvents.off($xeDatePicker, 'mousewheel');
|
|
@@ -18685,6 +19209,7 @@ dynamicApp.use(VxeDatePicker);
|
|
|
18685
19209
|
VxeUI.component(VxeDatePickerComponent);
|
|
18686
19210
|
const DatePicker = VxeDatePicker;
|
|
18687
19211
|
|
|
19212
|
+
const { errLog: errLog$d } = createComponentLog('date-range-picker');
|
|
18688
19213
|
var VxeDateRangePickerComponent = defineVxeComponent({
|
|
18689
19214
|
name: 'VxeDateRangePicker',
|
|
18690
19215
|
props: {
|
|
@@ -19562,7 +20087,7 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
19562
20087
|
break;
|
|
19563
20088
|
}
|
|
19564
20089
|
default:
|
|
19565
|
-
errLog('vxe.error.notCommands', [
|
|
20090
|
+
errLog$d('vxe.error.notCommands', [code]);
|
|
19566
20091
|
break;
|
|
19567
20092
|
}
|
|
19568
20093
|
}
|
|
@@ -20090,6 +20615,7 @@ var VxeDrawerComponent = defineVxeComponent({
|
|
|
20090
20615
|
type: Boolean,
|
|
20091
20616
|
default: () => getConfig$3().drawer.showTitleOverflow
|
|
20092
20617
|
},
|
|
20618
|
+
preload: Boolean,
|
|
20093
20619
|
width: [Number, String],
|
|
20094
20620
|
height: [Number, String],
|
|
20095
20621
|
resize: {
|
|
@@ -20596,6 +21122,7 @@ var VxeDrawerComponent = defineVxeComponent({
|
|
|
20596
21122
|
}
|
|
20597
21123
|
});
|
|
20598
21124
|
onMounted(() => {
|
|
21125
|
+
reactData.initialized = !!props.preload;
|
|
20599
21126
|
nextTick(() => {
|
|
20600
21127
|
if (props.modelValue) {
|
|
20601
21128
|
openDrawer();
|
|
@@ -20765,6 +21292,7 @@ dynamicApp.use(VxeEmpty);
|
|
|
20765
21292
|
VxeUI.component(VxeEmptyComponent);
|
|
20766
21293
|
const Empty = VxeEmpty;
|
|
20767
21294
|
|
|
21295
|
+
const { errLog: errLog$c } = createComponentLog('form');
|
|
20768
21296
|
class ItemInfo {
|
|
20769
21297
|
constructor($xeForm, item) {
|
|
20770
21298
|
const { field, itemRender, formatter } = item;
|
|
@@ -20772,22 +21300,22 @@ class ItemInfo {
|
|
|
20772
21300
|
if (XEUtils.isString(formatter)) {
|
|
20773
21301
|
const gFormatOpts = formats.get(formatter);
|
|
20774
21302
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
20775
|
-
errLog('vxe.error.notFormats', [
|
|
21303
|
+
errLog$c('vxe.error.notFormats', [formatter]);
|
|
20776
21304
|
}
|
|
20777
21305
|
}
|
|
20778
21306
|
else if (XEUtils.isArray(formatter)) {
|
|
20779
21307
|
const gFormatOpts = formats.get(formatter[0]);
|
|
20780
21308
|
if (!gFormatOpts || !gFormatOpts.formItemFormatMethod) {
|
|
20781
|
-
errLog('vxe.error.notFormats', [
|
|
21309
|
+
errLog$c('vxe.error.notFormats', [formatter[0]]);
|
|
20782
21310
|
}
|
|
20783
21311
|
}
|
|
20784
21312
|
}
|
|
20785
21313
|
if (field && itemRender) {
|
|
20786
21314
|
if (itemRender.startField && `${itemRender.startField}`.indexOf(field) >= 0) {
|
|
20787
|
-
errLog('vxe.error.modelConflicts', [`
|
|
21315
|
+
errLog$c('vxe.error.modelConflicts', [`field=${field}`, `item-render.startField=${itemRender.startField}`]);
|
|
20788
21316
|
}
|
|
20789
21317
|
if (itemRender.endField && `${itemRender.endField}`.indexOf(field) >= 0) {
|
|
20790
|
-
errLog('vxe.error.modelConflicts', [`
|
|
21318
|
+
errLog$c('vxe.error.modelConflicts', [`field=${field}`, `item-render.endField=${itemRender.endField}`]);
|
|
20791
21319
|
}
|
|
20792
21320
|
}
|
|
20793
21321
|
Object.assign(this, {
|
|
@@ -21511,6 +22039,7 @@ const VxeFormConfigItem = defineVxeComponent({
|
|
|
21511
22039
|
}
|
|
21512
22040
|
});
|
|
21513
22041
|
|
|
22042
|
+
const { errLog: errLog$b } = createComponentLog('form');
|
|
21514
22043
|
const componentDefaultModelProp = 'modelValue';
|
|
21515
22044
|
/**
|
|
21516
22045
|
* 已废弃
|
|
@@ -21597,7 +22126,7 @@ function getComponentOns(renderOpts, params, eFns, eventOns) {
|
|
|
21597
22126
|
XEUtils.objectEach(events, (func, key) => {
|
|
21598
22127
|
ons[getOnName(key)] = function (...args) {
|
|
21599
22128
|
if (!XEUtils.isFunction(func)) {
|
|
21600
|
-
errLog('vxe.error.errFunc', [
|
|
22129
|
+
errLog$b('vxe.error.errFunc', [func]);
|
|
21601
22130
|
}
|
|
21602
22131
|
func(params, ...args);
|
|
21603
22132
|
};
|
|
@@ -22024,6 +22553,7 @@ renderer.mixin({
|
|
|
22024
22553
|
// 以上已废弃
|
|
22025
22554
|
});
|
|
22026
22555
|
|
|
22556
|
+
const { warnLog: warnLog$7, errLog: errLog$a } = createComponentLog('form');
|
|
22027
22557
|
class Rule {
|
|
22028
22558
|
constructor(rule) {
|
|
22029
22559
|
Object.assign(this, {
|
|
@@ -22144,7 +22674,7 @@ function checkRuleStatus(rule, data, val) {
|
|
|
22144
22674
|
}
|
|
22145
22675
|
return true;
|
|
22146
22676
|
}
|
|
22147
|
-
function createReactData$
|
|
22677
|
+
function createReactData$9() {
|
|
22148
22678
|
return {
|
|
22149
22679
|
collapseAll: false,
|
|
22150
22680
|
staticItems: [],
|
|
@@ -22261,7 +22791,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
22261
22791
|
const $xeGrid = inject('$xeGrid', null);
|
|
22262
22792
|
const xID = XEUtils.uniqueId();
|
|
22263
22793
|
const { computeSize } = useSize(props);
|
|
22264
|
-
const reactData = reactive(createReactData$
|
|
22794
|
+
const reactData = reactive(createReactData$9());
|
|
22265
22795
|
const internalData = createInternalData$8();
|
|
22266
22796
|
const refElem = ref();
|
|
22267
22797
|
const refTooltip = ref();
|
|
@@ -22332,7 +22862,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
22332
22862
|
XEUtils.each(item.slots, (func) => {
|
|
22333
22863
|
if (!XEUtils.isFunction(func)) {
|
|
22334
22864
|
if (!slots[func]) {
|
|
22335
|
-
errLog('vxe.error.notSlot', [
|
|
22865
|
+
errLog$a('vxe.error.notSlot', [func]);
|
|
22336
22866
|
}
|
|
22337
22867
|
}
|
|
22338
22868
|
});
|
|
@@ -22555,11 +23085,11 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
22555
23085
|
customValid = validatorMethod(validParams);
|
|
22556
23086
|
}
|
|
22557
23087
|
else {
|
|
22558
|
-
warnLog('vxe.error.notValidators', [
|
|
23088
|
+
warnLog$7('vxe.error.notValidators', [validator]);
|
|
22559
23089
|
}
|
|
22560
23090
|
}
|
|
22561
23091
|
else {
|
|
22562
|
-
errLog('vxe.error.notValidators', [
|
|
23092
|
+
errLog$a('vxe.error.notValidators', [validator]);
|
|
22563
23093
|
}
|
|
22564
23094
|
}
|
|
22565
23095
|
else {
|
|
@@ -22949,7 +23479,7 @@ var VxeFormComponent = defineVxeComponent({
|
|
|
22949
23479
|
onMounted(() => {
|
|
22950
23480
|
nextTick(() => {
|
|
22951
23481
|
if (props.customLayout && props.items) {
|
|
22952
|
-
errLog('vxe.error.errConflicts', ['
|
|
23482
|
+
errLog$a('vxe.error.errConflicts', ['custom-layout', 'items']);
|
|
22953
23483
|
}
|
|
22954
23484
|
});
|
|
22955
23485
|
globalEvents.on($xeForm, 'resize', handleGlobalResizeEvent);
|
|
@@ -24366,7 +24896,7 @@ function createInternalData$7() {
|
|
|
24366
24896
|
// mdTime: 0
|
|
24367
24897
|
};
|
|
24368
24898
|
}
|
|
24369
|
-
function createReactData$
|
|
24899
|
+
function createReactData$8() {
|
|
24370
24900
|
return {};
|
|
24371
24901
|
}
|
|
24372
24902
|
var VxeImageComponent = defineVxeComponent({
|
|
@@ -24426,7 +24956,7 @@ var VxeImageComponent = defineVxeComponent({
|
|
|
24426
24956
|
const refElem = ref();
|
|
24427
24957
|
const { computeSize } = useSize(props);
|
|
24428
24958
|
const internalData = createInternalData$7();
|
|
24429
|
-
const reactData = reactive(createReactData$
|
|
24959
|
+
const reactData = reactive(createReactData$8());
|
|
24430
24960
|
const refMaps = {
|
|
24431
24961
|
refElem
|
|
24432
24962
|
};
|
|
@@ -24612,7 +25142,7 @@ var VxeImageComponent = defineVxeComponent({
|
|
|
24612
25142
|
]);
|
|
24613
25143
|
};
|
|
24614
25144
|
onBeforeUnmount(() => {
|
|
24615
|
-
XEUtils.assign(reactData, createReactData$
|
|
25145
|
+
XEUtils.assign(reactData, createReactData$8());
|
|
24616
25146
|
XEUtils.assign(internalData, createInternalData$7());
|
|
24617
25147
|
});
|
|
24618
25148
|
$xeImage.renderVN = renderVN;
|
|
@@ -24905,7 +25435,7 @@ const LayoutAside = VxeLayoutAside;
|
|
|
24905
25435
|
function createInternalData$6() {
|
|
24906
25436
|
return {};
|
|
24907
25437
|
}
|
|
24908
|
-
function createReactData$
|
|
25438
|
+
function createReactData$7() {
|
|
24909
25439
|
return {};
|
|
24910
25440
|
}
|
|
24911
25441
|
var VxeLayoutBodyComponent = defineVxeComponent({
|
|
@@ -24931,7 +25461,7 @@ var VxeLayoutBodyComponent = defineVxeComponent({
|
|
|
24931
25461
|
const refElem = ref();
|
|
24932
25462
|
const { computeSize } = useSize(props);
|
|
24933
25463
|
const internalData = createInternalData$6();
|
|
24934
|
-
const reactData = reactive(createReactData$
|
|
25464
|
+
const reactData = reactive(createReactData$7());
|
|
24935
25465
|
const refMaps = {
|
|
24936
25466
|
refElem
|
|
24937
25467
|
};
|
|
@@ -25355,6 +25885,7 @@ dynamicApp.use(VxeList);
|
|
|
25355
25885
|
VxeUI.component(VxeListComponent);
|
|
25356
25886
|
const List = VxeList;
|
|
25357
25887
|
|
|
25888
|
+
const { errLog: errLog$9 } = createComponentLog('menu');
|
|
25358
25889
|
const { menus: menus$1, getConfig: getConfig$1, getIcon: getIcon$1 } = VxeUI;
|
|
25359
25890
|
var VxeMenuComponent = defineVxeComponent({
|
|
25360
25891
|
name: 'VxeMenu',
|
|
@@ -25841,7 +26372,7 @@ var VxeMenuComponent = defineVxeComponent({
|
|
|
25841
26372
|
const { menuConfig } = props;
|
|
25842
26373
|
const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
|
|
25843
26374
|
if (menuConfig && !VxeUIContextMenu) {
|
|
25844
|
-
errLog('vxe.error.reqComp', ['vxe-context-menu']);
|
|
26375
|
+
errLog$9('vxe.error.reqComp', ['vxe-context-menu']);
|
|
25845
26376
|
}
|
|
25846
26377
|
globalEvents.on($xeMenu, 'resize', updateCollapseStyle);
|
|
25847
26378
|
updateCollapseStyle();
|
|
@@ -25875,6 +26406,7 @@ dynamicApp.use(VxeMenu);
|
|
|
25875
26406
|
VxeUI.component(VxeMenuComponent);
|
|
25876
26407
|
const Menu = VxeMenu;
|
|
25877
26408
|
|
|
26409
|
+
const { warnLog: warnLog$6, errLog: errLog$8 } = createComponentLog('modal');
|
|
25878
26410
|
const allActiveModals = [];
|
|
25879
26411
|
const msgQueue = [];
|
|
25880
26412
|
const notifyQueue = [];
|
|
@@ -25961,6 +26493,7 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
25961
26493
|
type: Boolean,
|
|
25962
26494
|
default: () => getConfig$3().modal.showFooter
|
|
25963
26495
|
},
|
|
26496
|
+
preload: Boolean,
|
|
25964
26497
|
showZoom: Boolean,
|
|
25965
26498
|
zoomConfig: Object,
|
|
25966
26499
|
showMaximize: {
|
|
@@ -27260,11 +27793,12 @@ var VxeModalComponent = defineVxeComponent({
|
|
|
27260
27793
|
});
|
|
27261
27794
|
onMounted(() => {
|
|
27262
27795
|
if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
|
|
27263
|
-
warnLog('vxe.modal.footPropErr');
|
|
27796
|
+
warnLog$6('vxe.modal.footPropErr');
|
|
27264
27797
|
}
|
|
27798
|
+
reactData.initialized = !!props.preload;
|
|
27265
27799
|
nextTick(() => {
|
|
27266
27800
|
if (props.storage && !props.id) {
|
|
27267
|
-
errLog('vxe.error.reqProp', ['
|
|
27801
|
+
errLog$8('vxe.error.reqProp', ['id']);
|
|
27268
27802
|
}
|
|
27269
27803
|
if (props.modelValue) {
|
|
27270
27804
|
openModal();
|
|
@@ -27716,12 +28250,34 @@ dynamicApp.use(VxeOption);
|
|
|
27716
28250
|
VxeUI.component(VxeOptionComponent);
|
|
27717
28251
|
const Option = VxeOption;
|
|
27718
28252
|
|
|
28253
|
+
const { errLog: errLog$7 } = createComponentLog('select');
|
|
27719
28254
|
function isOptionVisible(option) {
|
|
27720
28255
|
return option.visible !== false;
|
|
27721
28256
|
}
|
|
27722
28257
|
function getOptUniqueId$1() {
|
|
27723
28258
|
return XEUtils.uniqueId('opt_');
|
|
27724
28259
|
}
|
|
28260
|
+
function createReactData$6() {
|
|
28261
|
+
return {
|
|
28262
|
+
initialized: false,
|
|
28263
|
+
scrollYLoad: false,
|
|
28264
|
+
bodyHeight: 0,
|
|
28265
|
+
topSpaceHeight: 0,
|
|
28266
|
+
optList: [],
|
|
28267
|
+
staticOptions: [],
|
|
28268
|
+
reactFlag: 0,
|
|
28269
|
+
currentOption: null,
|
|
28270
|
+
searchValue: '',
|
|
28271
|
+
searchLoading: false,
|
|
28272
|
+
panelIndex: 0,
|
|
28273
|
+
panelStyle: {},
|
|
28274
|
+
panelPlacement: null,
|
|
28275
|
+
triggerFocusPanel: false,
|
|
28276
|
+
visiblePanel: false,
|
|
28277
|
+
isAniVisible: false,
|
|
28278
|
+
isActivated: false
|
|
28279
|
+
};
|
|
28280
|
+
}
|
|
27725
28281
|
function createInternalData$5() {
|
|
27726
28282
|
return {
|
|
27727
28283
|
// isLoaded: false,
|
|
@@ -27897,25 +28453,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
27897
28453
|
const refOptionPanel = ref();
|
|
27898
28454
|
const refVirtualBody = ref();
|
|
27899
28455
|
const { computeSize } = useSize(props);
|
|
27900
|
-
const reactData = reactive(
|
|
27901
|
-
initialized: false,
|
|
27902
|
-
scrollYLoad: false,
|
|
27903
|
-
bodyHeight: 0,
|
|
27904
|
-
topSpaceHeight: 0,
|
|
27905
|
-
optList: [],
|
|
27906
|
-
staticOptions: [],
|
|
27907
|
-
reactFlag: 0,
|
|
27908
|
-
currentOption: null,
|
|
27909
|
-
searchValue: '',
|
|
27910
|
-
searchLoading: false,
|
|
27911
|
-
panelIndex: 0,
|
|
27912
|
-
panelStyle: {},
|
|
27913
|
-
panelPlacement: null,
|
|
27914
|
-
triggerFocusPanel: false,
|
|
27915
|
-
visiblePanel: false,
|
|
27916
|
-
isAniVisible: false,
|
|
27917
|
-
isActivated: false
|
|
27918
|
-
});
|
|
28456
|
+
const reactData = reactive(createReactData$6());
|
|
27919
28457
|
const internalData = createInternalData$5();
|
|
27920
28458
|
const refMaps = {
|
|
27921
28459
|
refElem
|
|
@@ -28947,7 +29485,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
28947
29485
|
});
|
|
28948
29486
|
}
|
|
28949
29487
|
else {
|
|
28950
|
-
errLog('vxe.error.notConflictProp', ['default-config.selectMode=all', 'multiple=true']);
|
|
29488
|
+
errLog$7('vxe.error.notConflictProp', ['default-config.selectMode=all', 'multiple=true']);
|
|
28951
29489
|
}
|
|
28952
29490
|
}
|
|
28953
29491
|
else if (selectMode === 'first' || selectMode === 'last') {
|
|
@@ -29437,6 +29975,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
29437
29975
|
globalEvents.off($xeSelect, 'keydown');
|
|
29438
29976
|
globalEvents.off($xeSelect, 'blur');
|
|
29439
29977
|
globalEvents.off($xeSelect, 'resize');
|
|
29978
|
+
XEUtils.assign(reactData, createReactData$6());
|
|
29440
29979
|
XEUtils.assign(internalData, createInternalData$5());
|
|
29441
29980
|
});
|
|
29442
29981
|
provide('$xeSelect', $xeSelect);
|
|
@@ -29448,6 +29987,7 @@ var VxeSelectComponent = defineVxeComponent({
|
|
|
29448
29987
|
}
|
|
29449
29988
|
});
|
|
29450
29989
|
|
|
29990
|
+
const { warnLog: warnLog$5, errLog: errLog$6 } = createComponentLog('pager');
|
|
29451
29991
|
var VxePagerComponent = defineVxeComponent({
|
|
29452
29992
|
name: 'VxePager',
|
|
29453
29993
|
props: {
|
|
@@ -30049,7 +30589,7 @@ var VxePagerComponent = defineVxeComponent({
|
|
|
30049
30589
|
* @deprecated
|
|
30050
30590
|
*/
|
|
30051
30591
|
jumpPage(currentPage) {
|
|
30052
|
-
warnLog('vxe.error.delFunc', ['
|
|
30592
|
+
warnLog$5('vxe.error.delFunc', ['jumpPage', 'setCurrentPage']);
|
|
30053
30593
|
return $xePager.setCurrentPage(currentPage);
|
|
30054
30594
|
}
|
|
30055
30595
|
};
|
|
@@ -30120,7 +30660,7 @@ var VxePagerComponent = defineVxeComponent({
|
|
|
30120
30660
|
childNodes.push(renderFn());
|
|
30121
30661
|
}
|
|
30122
30662
|
else {
|
|
30123
|
-
errLog('vxe.error.notProp', [`
|
|
30663
|
+
errLog$6('vxe.error.notProp', [`layouts -> ${name}`]);
|
|
30124
30664
|
}
|
|
30125
30665
|
});
|
|
30126
30666
|
if (slots.right) {
|
|
@@ -30646,7 +31186,7 @@ function handlePrint(opts, printHtml = '') {
|
|
|
30646
31186
|
if (styleUrls && styleUrls.length) {
|
|
30647
31187
|
styleUrls.forEach(url => {
|
|
30648
31188
|
if (!/.css$/.test(url)) {
|
|
30649
|
-
warnLog('vxe.error.errProp', [url, `${url}.css`]);
|
|
31189
|
+
warnLog$b('vxe.error.errProp', [url, `${url}.css`]);
|
|
30650
31190
|
}
|
|
30651
31191
|
});
|
|
30652
31192
|
}
|
|
@@ -31875,6 +32415,9 @@ dynamicApp.use(VxeRadioButton);
|
|
|
31875
32415
|
VxeUI.component(VxeRadioButtonComponent);
|
|
31876
32416
|
const RadioButton = VxeRadioButton;
|
|
31877
32417
|
|
|
32418
|
+
function createReactData$5() {
|
|
32419
|
+
return {};
|
|
32420
|
+
}
|
|
31878
32421
|
function createInternalData$4() {
|
|
31879
32422
|
return {
|
|
31880
32423
|
// isLoaded: false
|
|
@@ -31916,7 +32459,7 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
31916
32459
|
const formItemInfo = inject('xeFormItemInfo', null);
|
|
31917
32460
|
const xID = XEUtils.uniqueId();
|
|
31918
32461
|
const { computeSize } = useSize(props);
|
|
31919
|
-
const reactData = reactive(
|
|
32462
|
+
const reactData = reactive(createReactData$5());
|
|
31920
32463
|
const internalData = createInternalData$4();
|
|
31921
32464
|
const computeIsReadonly = computed(() => {
|
|
31922
32465
|
const { readonly } = props;
|
|
@@ -32053,6 +32596,7 @@ var VxeRadioGroupComponent = defineVxeComponent({
|
|
|
32053
32596
|
});
|
|
32054
32597
|
});
|
|
32055
32598
|
onUnmounted(() => {
|
|
32599
|
+
XEUtils.assign(reactData, createReactData$5());
|
|
32056
32600
|
XEUtils.assign(internalData, createInternalData$4());
|
|
32057
32601
|
});
|
|
32058
32602
|
provide('$xeRadioGroup', $xeRadioGroup);
|
|
@@ -32438,7 +32982,7 @@ dynamicApp.use(VxeRow);
|
|
|
32438
32982
|
VxeUI.component(VxeRowComponent);
|
|
32439
32983
|
const Row = VxeRow;
|
|
32440
32984
|
|
|
32441
|
-
function createReactData$
|
|
32985
|
+
function createReactData$4() {
|
|
32442
32986
|
return {
|
|
32443
32987
|
groupName: XEUtils.uniqueId('xe_group_'),
|
|
32444
32988
|
selectStyle: {
|
|
@@ -32479,7 +33023,7 @@ var VxeSegmentedComponent = defineVxeComponent({
|
|
|
32479
33023
|
const refElem = ref();
|
|
32480
33024
|
const refWrapperElem = ref();
|
|
32481
33025
|
const refSelectedElem = ref();
|
|
32482
|
-
const reactData = reactive(createReactData$
|
|
33026
|
+
const reactData = reactive(createReactData$4());
|
|
32483
33027
|
const refMaps = {
|
|
32484
33028
|
refElem
|
|
32485
33029
|
};
|
|
@@ -32652,7 +33196,7 @@ var VxeSegmentedComponent = defineVxeComponent({
|
|
|
32652
33196
|
updateStyle();
|
|
32653
33197
|
});
|
|
32654
33198
|
onBeforeUnmount(() => {
|
|
32655
|
-
XEUtils.assign(reactData, createReactData$
|
|
33199
|
+
XEUtils.assign(reactData, createReactData$4());
|
|
32656
33200
|
});
|
|
32657
33201
|
$xeSegmented.renderVN = renderVN;
|
|
32658
33202
|
return $xeSegmented;
|
|
@@ -32680,6 +33224,7 @@ dynamicApp.use(VxeSelect);
|
|
|
32680
33224
|
VxeUI.component(VxeSelectComponent);
|
|
32681
33225
|
const Select = VxeSelect;
|
|
32682
33226
|
|
|
33227
|
+
const { warnLog: warnLog$4, errLog: errLog$5 } = createComponentLog('splitter');
|
|
32683
33228
|
var VxeSplitComponent = defineVxeComponent({
|
|
32684
33229
|
name: 'VxeSplitter',
|
|
32685
33230
|
props: {
|
|
@@ -32879,13 +33424,13 @@ var VxeSplitComponent = defineVxeComponent({
|
|
|
32879
33424
|
};
|
|
32880
33425
|
reactData.itemList = list.map(item => {
|
|
32881
33426
|
if (item.showAction) {
|
|
32882
|
-
warnLog('vxe.error.removeProp', ['
|
|
33427
|
+
warnLog$4('vxe.error.removeProp', ['show-action']);
|
|
32883
33428
|
}
|
|
32884
33429
|
if (item.slots) {
|
|
32885
33430
|
XEUtils.each(item.slots, (func) => {
|
|
32886
33431
|
if (!XEUtils.isFunction(func)) {
|
|
32887
33432
|
if (!slots[func]) {
|
|
32888
|
-
errLog('vxe.error.notSlot', [
|
|
33433
|
+
errLog$5('vxe.error.notSlot', [func]);
|
|
32889
33434
|
}
|
|
32890
33435
|
}
|
|
32891
33436
|
});
|
|
@@ -32895,10 +33440,10 @@ var VxeSplitComponent = defineVxeComponent({
|
|
|
32895
33440
|
});
|
|
32896
33441
|
});
|
|
32897
33442
|
if (staticItems.length) {
|
|
32898
|
-
errLog('vxe.error.errConflicts', ['<vxe-splitter-panel ...>', 'items']);
|
|
33443
|
+
errLog$5('vxe.error.errConflicts', ['<vxe-splitter-panel ...>', 'items']);
|
|
32899
33444
|
}
|
|
32900
33445
|
if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
|
|
32901
|
-
errLog('vxe.error.errConflicts', ['action-config.showPrevButton | action-config.showNextButton', 'Only supports 2 item']);
|
|
33446
|
+
errLog$5('vxe.error.errConflicts', ['action-config.showPrevButton | action-config.showNextButton', 'Only supports 2 item']);
|
|
32902
33447
|
}
|
|
32903
33448
|
return recalculate();
|
|
32904
33449
|
};
|
|
@@ -33584,15 +34129,15 @@ var VxeSplitComponent = defineVxeComponent({
|
|
|
33584
34129
|
const actionOpts = computeActionOpts.value;
|
|
33585
34130
|
const { showPrevButton, showNextButton } = actionOpts;
|
|
33586
34131
|
if (props.items && props.items.length) {
|
|
33587
|
-
errLog('vxe.error.errConflicts', ['<vxe-splitter-panel ...>', 'items']);
|
|
34132
|
+
errLog$5('vxe.error.errConflicts', ['<vxe-splitter-panel ...>', 'items']);
|
|
33588
34133
|
}
|
|
33589
34134
|
reactData.itemList = val || [];
|
|
33590
34135
|
if ((showPrevButton || showNextButton) && reactData.itemList.length > 2) {
|
|
33591
|
-
errLog('vxe.error.modelConflicts', ['
|
|
34136
|
+
errLog$5('vxe.error.modelConflicts', ['action-config.showPrevButton | action-config.showNextButton', '<vxe-splitter-panel ...> Only supports 2 panel']);
|
|
33592
34137
|
}
|
|
33593
34138
|
reactData.itemList.forEach(item => {
|
|
33594
34139
|
if (item.showAction) {
|
|
33595
|
-
warnLog('vxe.error.removeProp', ['
|
|
34140
|
+
warnLog$4('vxe.error.removeProp', ['showAction']);
|
|
33596
34141
|
}
|
|
33597
34142
|
});
|
|
33598
34143
|
recalculate();
|
|
@@ -33611,7 +34156,7 @@ var VxeSplitComponent = defineVxeComponent({
|
|
|
33611
34156
|
}
|
|
33612
34157
|
const actionOpts = computeActionOpts.value;
|
|
33613
34158
|
if (actionOpts.direction) {
|
|
33614
|
-
errLog('vxe.error.delProp', ['
|
|
34159
|
+
errLog$5('vxe.error.delProp', ['action-config.direction', 'action-config.showPrevButton | action-config.showNextButton']);
|
|
33615
34160
|
}
|
|
33616
34161
|
globalEvents.on($xeSplitter, 'resize', handleGlobalResizeEvent);
|
|
33617
34162
|
});
|
|
@@ -34458,9 +35003,24 @@ dynamicApp.use(VxeTabPane);
|
|
|
34458
35003
|
VxeUI.component(VxeTabPaneComponent);
|
|
34459
35004
|
const TabPane = VxeTabPane;
|
|
34460
35005
|
|
|
35006
|
+
const { errLog: errLog$4 } = createComponentLog('table-select');
|
|
34461
35007
|
function getRowUniqueId() {
|
|
34462
35008
|
return XEUtils.uniqueId('row_');
|
|
34463
35009
|
}
|
|
35010
|
+
function createReactData$3() {
|
|
35011
|
+
return {
|
|
35012
|
+
initialized: false,
|
|
35013
|
+
tableColumns: [],
|
|
35014
|
+
fullOptionList: [],
|
|
35015
|
+
panelIndex: 0,
|
|
35016
|
+
panelStyle: {},
|
|
35017
|
+
panelPlacement: null,
|
|
35018
|
+
triggerFocusPanel: false,
|
|
35019
|
+
visiblePanel: false,
|
|
35020
|
+
isAniVisible: false,
|
|
35021
|
+
isActivated: false
|
|
35022
|
+
};
|
|
35023
|
+
}
|
|
34464
35024
|
function createInternalData$3() {
|
|
34465
35025
|
return {
|
|
34466
35026
|
// hpTimeout: undefined,
|
|
@@ -34540,18 +35100,7 @@ var VxeTableSelectComponent = defineVxeComponent({
|
|
|
34540
35100
|
const refGridWrapper = ref();
|
|
34541
35101
|
const refOptionPanel = ref();
|
|
34542
35102
|
const refGrid = ref();
|
|
34543
|
-
const reactData = reactive(
|
|
34544
|
-
initialized: false,
|
|
34545
|
-
tableColumns: [],
|
|
34546
|
-
fullOptionList: [],
|
|
34547
|
-
panelIndex: 0,
|
|
34548
|
-
panelStyle: {},
|
|
34549
|
-
panelPlacement: null,
|
|
34550
|
-
triggerFocusPanel: false,
|
|
34551
|
-
visiblePanel: false,
|
|
34552
|
-
isAniVisible: false,
|
|
34553
|
-
isActivated: false
|
|
34554
|
-
});
|
|
35103
|
+
const reactData = reactive(createReactData$3());
|
|
34555
35104
|
const internalData = createInternalData$3();
|
|
34556
35105
|
const refMaps = {
|
|
34557
35106
|
refElem
|
|
@@ -34806,12 +35355,12 @@ var VxeTableSelectComponent = defineVxeComponent({
|
|
|
34806
35355
|
rowid = getRowUniqueId();
|
|
34807
35356
|
}
|
|
34808
35357
|
if (keyMaps[rowid]) {
|
|
34809
|
-
errLog('vxe.error.repeatKey', [
|
|
35358
|
+
errLog$4('vxe.error.repeatKey', [rowKeyField, rowid]);
|
|
34810
35359
|
}
|
|
34811
35360
|
keyMaps[rowid] = true;
|
|
34812
35361
|
const value = item[valueField];
|
|
34813
35362
|
if (rowMaps[value]) {
|
|
34814
|
-
errLog('vxe.error.repeatKey', [
|
|
35363
|
+
errLog$4('vxe.error.repeatKey', [valueField, value]);
|
|
34815
35364
|
}
|
|
34816
35365
|
rowMaps[value] = { item, index, items, parent: null, nodes: [] };
|
|
34817
35366
|
});
|
|
@@ -35155,11 +35704,12 @@ var VxeTableSelectComponent = defineVxeComponent({
|
|
|
35155
35704
|
globalEvents.off($xeTableSelect, 'mousedown');
|
|
35156
35705
|
globalEvents.off($xeTableSelect, 'blur');
|
|
35157
35706
|
globalEvents.off($xeTableSelect, 'resize');
|
|
35707
|
+
XEUtils.assign(reactData, createReactData$3());
|
|
35158
35708
|
XEUtils.assign(internalData, createInternalData$3());
|
|
35159
35709
|
});
|
|
35160
35710
|
nextTick(() => {
|
|
35161
35711
|
if (!VxeTableGridComponent) {
|
|
35162
|
-
errLog('vxe.error.reqComp', ['
|
|
35712
|
+
errLog$4('vxe.error.reqComp', ['vxe-grid']);
|
|
35163
35713
|
}
|
|
35164
35714
|
});
|
|
35165
35715
|
provide('$xeTableSelect', $xeTableSelect);
|
|
@@ -35180,6 +35730,7 @@ dynamicApp.use(VxeTableSelect);
|
|
|
35180
35730
|
VxeUI.component(VxeTableSelectComponent);
|
|
35181
35731
|
const TableSelect = VxeTableSelect;
|
|
35182
35732
|
|
|
35733
|
+
const { warnLog: warnLog$3, errLog: errLog$3 } = createComponentLog('tabs');
|
|
35183
35734
|
const scrollbarOffsetSize = 20;
|
|
35184
35735
|
var VxeTabsComponent = defineVxeComponent({
|
|
35185
35736
|
name: 'VxeTabs',
|
|
@@ -35535,7 +36086,7 @@ var VxeTabsComponent = defineVxeComponent({
|
|
|
35535
36086
|
});
|
|
35536
36087
|
}
|
|
35537
36088
|
else {
|
|
35538
|
-
errLog('vxe.error.notFunc', ['refresh-config.queryMethod']);
|
|
36089
|
+
errLog$3('vxe.error.notFunc', ['refresh-config.queryMethod']);
|
|
35539
36090
|
}
|
|
35540
36091
|
}
|
|
35541
36092
|
};
|
|
@@ -35716,11 +36267,11 @@ var VxeTabsComponent = defineVxeComponent({
|
|
|
35716
36267
|
return handlePrevNext(true);
|
|
35717
36268
|
},
|
|
35718
36269
|
prevTab() {
|
|
35719
|
-
warnLog('vxe.error.delFunc', ['
|
|
36270
|
+
warnLog$3('vxe.error.delFunc', ['prevTab', 'prev']);
|
|
35720
36271
|
return tabsMethods.prev();
|
|
35721
36272
|
},
|
|
35722
36273
|
nextTab() {
|
|
35723
|
-
warnLog('vxe.error.delFunc', ['
|
|
36274
|
+
warnLog$3('vxe.error.delFunc', ['nextTab', 'next']);
|
|
35724
36275
|
return tabsMethods.next();
|
|
35725
36276
|
}
|
|
35726
36277
|
};
|
|
@@ -36488,6 +37039,7 @@ dynamicApp.use(VxeText);
|
|
|
36488
37039
|
VxeUI.component(VxeTextComponent);
|
|
36489
37040
|
const Text = VxeText;
|
|
36490
37041
|
|
|
37042
|
+
const { warnLog: warnLog$2 } = createComponentLog('textarea');
|
|
36491
37043
|
let autoTxtElem;
|
|
36492
37044
|
var VxeTextareaComponent = defineVxeComponent({
|
|
36493
37045
|
name: 'VxeTextarea',
|
|
@@ -36852,7 +37404,7 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
36852
37404
|
nextTick(() => {
|
|
36853
37405
|
const { autosize, autoSize } = props;
|
|
36854
37406
|
if (autosize) {
|
|
36855
|
-
warnLog('vxe.error.delProp', ['autosize', 'auto-size']);
|
|
37407
|
+
warnLog$2('vxe.error.delProp', ['autosize', 'auto-size']);
|
|
36856
37408
|
}
|
|
36857
37409
|
if (autosize || autoSize) {
|
|
36858
37410
|
updateAutoTxt();
|
|
@@ -37224,6 +37776,7 @@ function clearRowAnimate(elem, clss) {
|
|
|
37224
37776
|
}, 500);
|
|
37225
37777
|
}
|
|
37226
37778
|
|
|
37779
|
+
const { errLog: errLog$2 } = createComponentLog('tree');
|
|
37227
37780
|
const { menus, getConfig, getI18n, getIcon } = VxeUI;
|
|
37228
37781
|
/**
|
|
37229
37782
|
* 生成节点的唯一主键
|
|
@@ -37933,7 +38486,7 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
37933
38486
|
handleData(true);
|
|
37934
38487
|
if (sYLoad) {
|
|
37935
38488
|
if (!(props.height || props.maxHeight)) {
|
|
37936
|
-
errLog('vxe.error.reqProp', ['
|
|
38489
|
+
errLog$2('vxe.error.reqProp', ['height | max-height | virtual-y-config.enabled=false']);
|
|
37937
38490
|
}
|
|
37938
38491
|
}
|
|
37939
38492
|
return computeScrollLoad().then(() => {
|
|
@@ -39869,17 +40422,17 @@ var VxeTreeComponent = defineVxeComponent({
|
|
|
39869
40422
|
const { transform, drag, menuConfig } = props;
|
|
39870
40423
|
const dragOpts = computeDragOpts.value;
|
|
39871
40424
|
if (drag && !transform) {
|
|
39872
|
-
errLog('vxe.error.notSupportProp', ['drag', 'transform=false', 'transform=true']);
|
|
40425
|
+
errLog$2('vxe.error.notSupportProp', ['drag', 'transform=false', 'transform=true']);
|
|
39873
40426
|
}
|
|
39874
40427
|
if (dragOpts.isCrossTreeDrag) {
|
|
39875
|
-
errLog('vxe.error.notProp', ['drag-config.isCrossTreeDrag']);
|
|
40428
|
+
errLog$2('vxe.error.notProp', ['drag-config.isCrossTreeDrag']);
|
|
39876
40429
|
}
|
|
39877
40430
|
// if (valueField) {
|
|
39878
40431
|
// errLog('vxe.error.delProp', ['value-field', 'value-field'])
|
|
39879
40432
|
// }
|
|
39880
40433
|
const VxeUIContextMenu = VxeUI.getComponent('VxeContextMenu');
|
|
39881
40434
|
if (menuConfig && !VxeUIContextMenu) {
|
|
39882
|
-
errLog('vxe.error.reqComp', ['vxe-context-menu']);
|
|
40435
|
+
errLog$2('vxe.error.reqComp', ['vxe-context-menu']);
|
|
39883
40436
|
}
|
|
39884
40437
|
if (props.autoResize) {
|
|
39885
40438
|
const el = refElem.value;
|
|
@@ -39928,6 +40481,7 @@ dynamicApp.use(VxeTree);
|
|
|
39928
40481
|
VxeUI.component(VxeTreeComponent);
|
|
39929
40482
|
const Tree = VxeTree;
|
|
39930
40483
|
|
|
40484
|
+
const { warnLog: warnLog$1, errLog: errLog$1 } = createComponentLog('tree-select');
|
|
39931
40485
|
function getOptUniqueId() {
|
|
39932
40486
|
return XEUtils.uniqueId('node_');
|
|
39933
40487
|
}
|
|
@@ -40293,12 +40847,12 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
40293
40847
|
nodeid = getOptUniqueId();
|
|
40294
40848
|
}
|
|
40295
40849
|
if (keyMaps[nodeid]) {
|
|
40296
|
-
errLog('vxe.error.repeatKey', [nodeKeyField, nodeid]);
|
|
40850
|
+
errLog$1('vxe.error.repeatKey', [nodeKeyField, nodeid]);
|
|
40297
40851
|
}
|
|
40298
40852
|
keyMaps[nodeid] = true;
|
|
40299
40853
|
const value = item[valueField];
|
|
40300
40854
|
if (nodeMaps[value]) {
|
|
40301
|
-
errLog('vxe.error.repeatKey', [valueField, value]);
|
|
40855
|
+
errLog$1('vxe.error.repeatKey', [valueField, value]);
|
|
40302
40856
|
}
|
|
40303
40857
|
nodeMaps[value] = {
|
|
40304
40858
|
item,
|
|
@@ -40895,7 +41449,7 @@ var VxeTreeSelectComponent = defineVxeComponent({
|
|
|
40895
41449
|
cacheLazyDataMap();
|
|
40896
41450
|
onMounted(() => {
|
|
40897
41451
|
if (XEUtils.isBoolean(props.autoClose)) {
|
|
40898
|
-
warnLog('vxe.error.delProp', ['auto-close', 'checked-closable | clear-closable']);
|
|
41452
|
+
warnLog$1('vxe.error.delProp', ['auto-close', 'checked-closable | clear-closable']);
|
|
40899
41453
|
}
|
|
40900
41454
|
globalEvents.on($xeTreeSelect, 'mousewheel', handleGlobalMousewheelEvent);
|
|
40901
41455
|
globalEvents.on($xeTreeSelect, 'mousedown', handleGlobalMousedownEvent);
|
|
@@ -41030,6 +41584,7 @@ const saveLocalFile = (options) => {
|
|
|
41030
41584
|
return Promise.reject(new Error(getI18n$2('vxe.error.notExp')));
|
|
41031
41585
|
};
|
|
41032
41586
|
|
|
41587
|
+
const { warnLog, errLog } = createComponentLog('upload');
|
|
41033
41588
|
function createReactData() {
|
|
41034
41589
|
return {
|
|
41035
41590
|
isDragUploadStatus: false,
|
|
@@ -41237,8 +41792,12 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
41237
41792
|
'remove-fail',
|
|
41238
41793
|
'download',
|
|
41239
41794
|
'download-fail',
|
|
41795
|
+
'upload-start',
|
|
41240
41796
|
'upload-success',
|
|
41241
41797
|
'upload-error',
|
|
41798
|
+
'upload-end',
|
|
41799
|
+
'upload-queue-start',
|
|
41800
|
+
'upload-queue-end',
|
|
41242
41801
|
'sort-dragend',
|
|
41243
41802
|
'more-visible'
|
|
41244
41803
|
],
|
|
@@ -41572,6 +42131,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
41572
42131
|
const fileKey = getFieldKey(item);
|
|
41573
42132
|
const uploadFn = props.uploadMethod || getConfig$3().upload.uploadMethod;
|
|
41574
42133
|
if (uploadFn) {
|
|
42134
|
+
dispatchEvent('upload-start', { option: item }, null);
|
|
41575
42135
|
return Promise.resolve(uploadFn({
|
|
41576
42136
|
$upload: $xeUpload,
|
|
41577
42137
|
file,
|
|
@@ -41612,6 +42172,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
41612
42172
|
if (cacheItem) {
|
|
41613
42173
|
cacheItem.loading = false;
|
|
41614
42174
|
}
|
|
42175
|
+
dispatchEvent('upload-end', { option: item }, null);
|
|
41615
42176
|
});
|
|
41616
42177
|
}
|
|
41617
42178
|
else {
|
|
@@ -41720,6 +42281,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
41720
42281
|
}
|
|
41721
42282
|
}
|
|
41722
42283
|
}
|
|
42284
|
+
dispatchEvent('upload-queue-start', { files: selectFiles }, evnt);
|
|
41723
42285
|
const cacheMaps = Object.assign({}, reactData.fileCacheMaps);
|
|
41724
42286
|
const newFileList = multiple ? fileList : [];
|
|
41725
42287
|
const uploadPromiseRests = [];
|
|
@@ -41756,6 +42318,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
41756
42318
|
});
|
|
41757
42319
|
Promise.all(urlMode ? uploadPromiseRests : []).then(() => {
|
|
41758
42320
|
const restFileList = reactData.fileList;
|
|
42321
|
+
dispatchEvent('upload-queue-end', { options: restFileList, files: selectFiles }, evnt);
|
|
41759
42322
|
handleChange(restFileList);
|
|
41760
42323
|
// 自动更新校验状态
|
|
41761
42324
|
if ($xeForm && formItemInfo) {
|
|
@@ -42817,10 +43380,10 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
42817
43380
|
});
|
|
42818
43381
|
onMounted(() => {
|
|
42819
43382
|
if (props.multiple && props.singleMode) {
|
|
42820
|
-
errLog('vxe.error.errConflicts', ['
|
|
43383
|
+
errLog('vxe.error.errConflicts', ['multiple', 'single-mode']);
|
|
42821
43384
|
}
|
|
42822
43385
|
if (props.imageStyle) {
|
|
42823
|
-
warnLog('vxe.error.delProp', ['
|
|
43386
|
+
warnLog('vxe.error.delProp', ['image-style', 'image-config']);
|
|
42824
43387
|
}
|
|
42825
43388
|
if (props.dragSort) {
|
|
42826
43389
|
initTpImg();
|