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