vxe-pc-ui 4.15.7 → 4.15.9
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 +71 -37
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/date-panel/src/date-panel.js +14 -6
- package/es/date-panel/src/util.js +1 -1
- package/es/date-picker/src/date-picker.js +53 -27
- package/es/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/upload/src/upload.js +2 -2
- package/lib/date-panel/src/date-panel.js +14 -6
- package/lib/date-panel/src/date-panel.min.js +1 -1
- package/lib/date-panel/src/util.js +2 -2
- package/lib/date-panel/src/util.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +57 -25
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +75 -36
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/upload/src/upload.js +1 -2
- package/lib/upload/src/upload.min.js +1 -1
- package/package.json +2 -2
- package/packages/date-panel/src/date-panel.ts +14 -6
- package/packages/date-panel/src/util.ts +1 -1
- package/packages/date-picker/src/date-picker.ts +56 -30
- package/packages/upload/src/upload.ts +2 -2
- package/types/components/date-picker.d.ts +1 -0
- package/types/components/gantt.d.ts +1 -0
- /package/es/icon/{iconfont.1782112308661.ttf → iconfont.1782144837167.ttf} +0 -0
- /package/es/icon/{iconfont.1782112308661.woff → iconfont.1782144837167.woff} +0 -0
- /package/es/icon/{iconfont.1782112308661.woff2 → iconfont.1782144837167.woff2} +0 -0
- /package/es/{iconfont.1782112308661.ttf → iconfont.1782144837167.ttf} +0 -0
- /package/es/{iconfont.1782112308661.woff → iconfont.1782144837167.woff} +0 -0
- /package/es/{iconfont.1782112308661.woff2 → iconfont.1782144837167.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1782112308661.ttf → iconfont.1782144837167.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1782112308661.woff → iconfont.1782144837167.woff} +0 -0
- /package/lib/icon/style/{iconfont.1782112308661.woff2 → iconfont.1782144837167.woff2} +0 -0
- /package/lib/{iconfont.1782112308661.ttf → iconfont.1782144837167.ttf} +0 -0
- /package/lib/{iconfont.1782112308661.woff → iconfont.1782144837167.woff} +0 -0
- /package/lib/{iconfont.1782112308661.woff2 → iconfont.1782144837167.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -81,7 +81,7 @@ function checkDynamic() {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
const { log } = VxeUI;
|
|
84
|
-
const uiVersion = `ui v${"4.15.
|
|
84
|
+
const uiVersion = `ui v${"4.15.9"}`;
|
|
85
85
|
function createComponentLog(name) {
|
|
86
86
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
87
87
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -94,7 +94,7 @@ function createComponentLog(name) {
|
|
|
94
94
|
const warnLog$b = log.create('warn', uiVersion);
|
|
95
95
|
log.create('error', uiVersion);
|
|
96
96
|
|
|
97
|
-
const version = "4.15.
|
|
97
|
+
const version = "4.15.9";
|
|
98
98
|
VxeUI.uiVersion = version;
|
|
99
99
|
VxeUI.dynamicApp = dynamicApp;
|
|
100
100
|
function config(options) {
|
|
@@ -4670,7 +4670,7 @@ function isAllSameChar(str, char) {
|
|
|
4670
4670
|
}
|
|
4671
4671
|
return true;
|
|
4672
4672
|
}
|
|
4673
|
-
function
|
|
4673
|
+
function checkDateInputFormat(numStr, formatKey) {
|
|
4674
4674
|
const numVal = XEUtils.toNumber(numStr);
|
|
4675
4675
|
switch (formatKey) {
|
|
4676
4676
|
case 'yyyy':
|
|
@@ -16129,10 +16129,10 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
16129
16129
|
const isDateTimeType = computeIsDateTimeType.value;
|
|
16130
16130
|
return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
16131
16131
|
});
|
|
16132
|
-
const
|
|
16132
|
+
const computeDateStartDate = computed(() => {
|
|
16133
16133
|
return props.startDate ? XEUtils.toStringDate(props.startDate) : null;
|
|
16134
16134
|
});
|
|
16135
|
-
const
|
|
16135
|
+
const computeDateEndDate = computed(() => {
|
|
16136
16136
|
return props.endDate ? XEUtils.toStringDate(props.endDate) : null;
|
|
16137
16137
|
});
|
|
16138
16138
|
const computeDateListValue = computed(() => {
|
|
@@ -16193,7 +16193,7 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
16193
16193
|
return val;
|
|
16194
16194
|
});
|
|
16195
16195
|
const computeIsDisabledPrevDateBtn = computed(() => {
|
|
16196
|
-
const dateStartTime =
|
|
16196
|
+
const dateStartTime = computeDateStartDate.value;
|
|
16197
16197
|
const { selectMonth } = reactData;
|
|
16198
16198
|
if (selectMonth && dateStartTime) {
|
|
16199
16199
|
return selectMonth <= dateStartTime;
|
|
@@ -16201,7 +16201,7 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
16201
16201
|
return false;
|
|
16202
16202
|
});
|
|
16203
16203
|
const computeIsDisabledNextDateBtn = computed(() => {
|
|
16204
|
-
const dateEndTime =
|
|
16204
|
+
const dateEndTime = computeDateEndDate.value;
|
|
16205
16205
|
const { selectMonth } = reactData;
|
|
16206
16206
|
if (selectMonth && dateEndTime) {
|
|
16207
16207
|
return XEUtils.getWhatMonth(selectMonth, 0, 'last') >= dateEndTime;
|
|
@@ -16598,6 +16598,8 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
16598
16598
|
const { type } = props;
|
|
16599
16599
|
const { inputLabel, datetimePanelValue } = reactData;
|
|
16600
16600
|
const dateLabelFormat = computeDateLabelFormat.value;
|
|
16601
|
+
const dateStartDate = computeDateStartDate.value;
|
|
16602
|
+
const dateEndDate = computeDateEndDate.value;
|
|
16601
16603
|
if (inpVal) {
|
|
16602
16604
|
let inpDateVal = parseDate(inpVal, dateLabelFormat);
|
|
16603
16605
|
if (XEUtils.isValidDate(inpDateVal)) {
|
|
@@ -16609,6 +16611,12 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
16609
16611
|
reactData.inputLabel = inpDateVal;
|
|
16610
16612
|
}
|
|
16611
16613
|
else {
|
|
16614
|
+
if (dateEndDate && inpDateVal > dateEndDate) {
|
|
16615
|
+
inpDateVal = dateEndDate;
|
|
16616
|
+
}
|
|
16617
|
+
if (dateStartDate && inpDateVal < dateStartDate) {
|
|
16618
|
+
inpDateVal = dateStartDate;
|
|
16619
|
+
}
|
|
16612
16620
|
let isChange = false;
|
|
16613
16621
|
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
16614
16622
|
if (type === 'datetime') {
|
|
@@ -16910,8 +16918,8 @@ var VxeDatePanelComponent = defineVxeComponent({
|
|
|
16910
16918
|
}
|
|
16911
16919
|
};
|
|
16912
16920
|
const isRangeDisabled = (item) => {
|
|
16913
|
-
const dateStartTime =
|
|
16914
|
-
const dateEndTime =
|
|
16921
|
+
const dateStartTime = computeDateStartDate.value;
|
|
16922
|
+
const dateEndTime = computeDateEndDate.value;
|
|
16915
16923
|
const { date } = item;
|
|
16916
16924
|
if (dateStartTime && dateStartTime.getTime() > date.getTime()) {
|
|
16917
16925
|
return true;
|
|
@@ -17775,6 +17783,7 @@ VxeUI.component(VxeDatePanelComponent);
|
|
|
17775
17783
|
const DatePanel = VxeDatePanel;
|
|
17776
17784
|
|
|
17777
17785
|
const { warnLog: warnLog$8, errLog: errLog$e } = createComponentLog('date-picker');
|
|
17786
|
+
const defaultMaskPlaceholder = '*';
|
|
17778
17787
|
const maskedTypes = ['year', 'month', 'date', 'datetime', 'time'];
|
|
17779
17788
|
const inputMaskedKeys = ['y', 'M', 'd', 'H', 'm', 'n', 's'];
|
|
17780
17789
|
const parseInputKayMaps = {};
|
|
@@ -17797,6 +17806,7 @@ function createReactData$a() {
|
|
|
17797
17806
|
function createInternalData$9() {
|
|
17798
17807
|
return {
|
|
17799
17808
|
// hpTimeout: undefined,
|
|
17809
|
+
// fsTimeout: undefined,
|
|
17800
17810
|
inputLabel: '',
|
|
17801
17811
|
laseFocusMasked: 0
|
|
17802
17812
|
};
|
|
@@ -18123,7 +18133,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18123
18133
|
const computeMaskChar = computed(() => {
|
|
18124
18134
|
const maskedOpts = computeMaskedOpts.value;
|
|
18125
18135
|
const { maskPlaceholder } = maskedOpts;
|
|
18126
|
-
return (maskPlaceholder ? ('' + maskPlaceholder)[0] : '') ||
|
|
18136
|
+
return (maskPlaceholder ? ('' + maskPlaceholder)[0] : '') || defaultMaskPlaceholder;
|
|
18127
18137
|
});
|
|
18128
18138
|
const updateModelValue = () => {
|
|
18129
18139
|
const { modelValue } = props;
|
|
@@ -18280,6 +18290,8 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18280
18290
|
const { inputLabel } = internalData;
|
|
18281
18291
|
const dateLabelFormat = computeDateLabelFormat.value;
|
|
18282
18292
|
const maskedOpts = computeMaskedOpts.value;
|
|
18293
|
+
const dateStartDate = computeDateStartDate.value;
|
|
18294
|
+
const dateEndDate = computeDateEndDate.value;
|
|
18283
18295
|
if (!inpVal) {
|
|
18284
18296
|
handleChange('', { type: 'check' });
|
|
18285
18297
|
return;
|
|
@@ -18291,12 +18303,16 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18291
18303
|
allMaskedKeys.forEach(formatKey => {
|
|
18292
18304
|
const fkIndex = dateLabelFormat.indexOf(formatKey);
|
|
18293
18305
|
if (fkIndex > -1) {
|
|
18294
|
-
|
|
18306
|
+
const valStr = inpVal.slice(fkIndex, fkIndex + formatKey.length).replace(/\D/g, '');
|
|
18307
|
+
if (!valStr) {
|
|
18308
|
+
return;
|
|
18309
|
+
}
|
|
18310
|
+
let valNum = XEUtils.toNumber(valStr);
|
|
18295
18311
|
// 自动纠错最小值
|
|
18296
|
-
if (!
|
|
18297
|
-
|
|
18312
|
+
if (!valNum && ['MM', 'dd'].includes(formatKey)) {
|
|
18313
|
+
valNum = 1;
|
|
18298
18314
|
}
|
|
18299
|
-
inpVal = inpVal.slice(0, fkIndex) + XEUtils.padStart(
|
|
18315
|
+
inpVal = inpVal.slice(0, fkIndex) + XEUtils.padStart(checkDateInputFormat(valNum, formatKey), formatKey.length, '0') + inpVal.slice(fkIndex + formatKey.length);
|
|
18300
18316
|
}
|
|
18301
18317
|
});
|
|
18302
18318
|
}
|
|
@@ -18320,6 +18336,12 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18320
18336
|
handleInputLabel(inpDateVal, true);
|
|
18321
18337
|
return;
|
|
18322
18338
|
}
|
|
18339
|
+
if (dateEndDate && inpDateVal > dateEndDate) {
|
|
18340
|
+
inpDateVal = dateEndDate;
|
|
18341
|
+
}
|
|
18342
|
+
if (dateStartDate && inpDateVal < dateStartDate) {
|
|
18343
|
+
inpDateVal = dateStartDate;
|
|
18344
|
+
}
|
|
18323
18345
|
let isChange = false;
|
|
18324
18346
|
const firstDayOfWeek = computeFirstDayOfWeek.value;
|
|
18325
18347
|
if (type === 'datetime') {
|
|
@@ -18356,11 +18378,22 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18356
18378
|
const maskedOpts = computeMaskedOpts.value;
|
|
18357
18379
|
const { align } = maskedOpts;
|
|
18358
18380
|
const maskChar = computeMaskChar.value;
|
|
18359
|
-
const
|
|
18381
|
+
const numVal = XEUtils.toNumber(numStr);
|
|
18382
|
+
let restVal = checkDateInputFormat(numVal, chunkFormat);
|
|
18360
18383
|
if (isFull) {
|
|
18361
|
-
|
|
18384
|
+
// 自动纠错最小值
|
|
18385
|
+
if (!restVal && ['MM', 'dd'].includes(chunkFormat)) {
|
|
18386
|
+
restVal = 1;
|
|
18387
|
+
}
|
|
18362
18388
|
}
|
|
18363
|
-
|
|
18389
|
+
let restStr = '' + restVal;
|
|
18390
|
+
if (numStr.length > restStr.length) {
|
|
18391
|
+
restStr = restStr.padStart(numStr.length, '0');
|
|
18392
|
+
}
|
|
18393
|
+
if (isFull) {
|
|
18394
|
+
return XEUtils.padStart(restStr, chunkFormat.length, '0');
|
|
18395
|
+
}
|
|
18396
|
+
return XEUtils[align === 'right' ? 'padStart' : 'padEnd'](restStr, chunkFormat.length, maskChar);
|
|
18364
18397
|
};
|
|
18365
18398
|
const handleArrowInputDate = (evnt, isUpArrow, isDwArrow, isLtArrow, isRtArrow) => {
|
|
18366
18399
|
const { type, multiple } = props;
|
|
@@ -18395,7 +18428,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18395
18428
|
const chunkValue = inpValue.slice(chunkStartIndex, chunkEndIndex);
|
|
18396
18429
|
if (parseInputKayMaps[selectKey]) {
|
|
18397
18430
|
const chunkNum = (isAllSameChar(chunkValue, maskChar) ? getChunkDefaultNum(selectKey) : XEUtils.toNumber(chunkValue)) + (isUpArrow ? 1 : -1);
|
|
18398
|
-
const restValue = inpValue.slice(0, chunkStartIndex) + checkMaskedInputValue(chunkNum, chunkFormat, true) + inpValue.slice(chunkEndIndex);
|
|
18431
|
+
const restValue = inpValue.slice(0, chunkStartIndex) + checkMaskedInputValue('' + chunkNum, chunkFormat, true) + inpValue.slice(chunkEndIndex);
|
|
18399
18432
|
evnt.preventDefault();
|
|
18400
18433
|
if (restValue.indexOf(maskChar) === -1) {
|
|
18401
18434
|
// 解析日期
|
|
@@ -18571,6 +18604,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18571
18604
|
internalData.isTriggerMasked = false;
|
|
18572
18605
|
};
|
|
18573
18606
|
const handleMaskedSelectedDate = (evnt, isFocus) => {
|
|
18607
|
+
internalData.fsTimeout = undefined;
|
|
18574
18608
|
const { type, multiple, modelValue } = props;
|
|
18575
18609
|
if (multiple) {
|
|
18576
18610
|
return;
|
|
@@ -18645,7 +18679,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18645
18679
|
selectKey = dateMaskedFormat[selectionStart - 1];
|
|
18646
18680
|
}
|
|
18647
18681
|
if (selectKey) {
|
|
18648
|
-
evnt.
|
|
18682
|
+
evnt.stopPropagation();
|
|
18649
18683
|
const skRest = dateMaskedFormat.match(new RegExp(selectKey + '+'));
|
|
18650
18684
|
if (skRest) {
|
|
18651
18685
|
const chunkFormat = skRest[0] || '';
|
|
@@ -18678,38 +18712,38 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
18678
18712
|
};
|
|
18679
18713
|
const focusEvent = (evnt) => {
|
|
18680
18714
|
const { multiple, editable, maskedConfig } = props;
|
|
18715
|
+
const { fsTimeout } = internalData;
|
|
18681
18716
|
const maskedOpts = computeMaskedOpts.value;
|
|
18682
18717
|
const popupOpts = computePopupOpts.value;
|
|
18683
18718
|
const { trigger } = popupOpts;
|
|
18684
18719
|
reactData.isActivated = true;
|
|
18720
|
+
if (fsTimeout) {
|
|
18721
|
+
clearTimeout(fsTimeout);
|
|
18722
|
+
}
|
|
18685
18723
|
if (!trigger || trigger === 'default') {
|
|
18686
18724
|
datePickerOpenEvent(evnt);
|
|
18687
|
-
setTimeout(() => {
|
|
18688
|
-
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
18689
|
-
handleMaskedSelectedDate(evnt, true);
|
|
18690
|
-
}
|
|
18691
|
-
}, 15);
|
|
18692
18725
|
}
|
|
18693
18726
|
else if (trigger === 'icon') {
|
|
18694
18727
|
hidePanel();
|
|
18695
|
-
setTimeout(() => {
|
|
18696
|
-
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
18697
|
-
handleMaskedSelectedDate(evnt, true);
|
|
18698
|
-
}
|
|
18699
|
-
}, 15);
|
|
18700
18728
|
}
|
|
18701
|
-
|
|
18702
|
-
|
|
18729
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
18730
|
+
internalData.fsTimeout = setTimeout(() => {
|
|
18703
18731
|
handleMaskedSelectedDate(evnt, true);
|
|
18704
|
-
}
|
|
18732
|
+
}, 20);
|
|
18705
18733
|
}
|
|
18706
18734
|
triggerEvent(evnt);
|
|
18707
18735
|
};
|
|
18708
18736
|
const clickEvent = (evnt) => {
|
|
18709
|
-
const { editable, maskedConfig } = props;
|
|
18737
|
+
const { multiple, editable, maskedConfig } = props;
|
|
18738
|
+
const { fsTimeout } = internalData;
|
|
18710
18739
|
const maskedOpts = computeMaskedOpts.value;
|
|
18711
|
-
if (
|
|
18712
|
-
|
|
18740
|
+
if (fsTimeout) {
|
|
18741
|
+
clearTimeout(fsTimeout);
|
|
18742
|
+
}
|
|
18743
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
18744
|
+
internalData.fsTimeout = setTimeout(() => {
|
|
18745
|
+
handleMaskedSelectedDate(evnt);
|
|
18746
|
+
}, 10);
|
|
18713
18747
|
}
|
|
18714
18748
|
triggerEvent(evnt);
|
|
18715
18749
|
};
|
|
@@ -42349,7 +42383,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
42349
42383
|
}
|
|
42350
42384
|
};
|
|
42351
42385
|
const handleUploadFile = (files, evnt) => {
|
|
42352
|
-
const { multiple,
|
|
42386
|
+
const { multiple, showLimitSize, limitSizeText, showLimitCount, limitCountText, autoSubmit } = props;
|
|
42353
42387
|
const { fileList } = reactData;
|
|
42354
42388
|
const beforeSelectFn = props.beforeSelectMethod || getConfig$3().upload.beforeSelectMethod;
|
|
42355
42389
|
const uploadFn = props.uploadMethod || getConfig$3().upload.uploadMethod;
|
|
@@ -42462,7 +42496,7 @@ var VxeUploadComponent = defineVxeComponent({
|
|
|
42462
42496
|
newFileList.forEach(item => {
|
|
42463
42497
|
dispatchEvent('add', { option: item }, evnt);
|
|
42464
42498
|
});
|
|
42465
|
-
Promise.all(
|
|
42499
|
+
Promise.all(uploadPromiseRests).then(() => {
|
|
42466
42500
|
const restFileList = reactData.fileList;
|
|
42467
42501
|
dispatchEvent('upload-queue-end', { options: restFileList, files: selectFiles }, evnt);
|
|
42468
42502
|
handleChange(restFileList);
|