vxe-pc-ui 3.15.7 → 3.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/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 -25
- 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 +54 -24
- 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 +72 -35
- 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 +55 -26
- 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.1782112293489.ttf → iconfont.1782144829906.ttf} +0 -0
- /package/es/icon/{iconfont.1782112293489.woff → iconfont.1782144829906.woff} +0 -0
- /package/es/icon/{iconfont.1782112293489.woff2 → iconfont.1782144829906.woff2} +0 -0
- /package/es/{iconfont.1782112293489.ttf → iconfont.1782144829906.ttf} +0 -0
- /package/es/{iconfont.1782112293489.woff → iconfont.1782144829906.woff} +0 -0
- /package/es/{iconfont.1782112293489.woff2 → iconfont.1782144829906.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1782112293489.ttf → iconfont.1782144829906.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1782112293489.woff → iconfont.1782144829906.woff} +0 -0
- /package/lib/icon/style/{iconfont.1782112293489.woff2 → iconfont.1782144829906.woff2} +0 -0
- /package/lib/{iconfont.1782112293489.ttf → iconfont.1782144829906.ttf} +0 -0
- /package/lib/{iconfont.1782112293489.woff → iconfont.1782144829906.woff} +0 -0
- /package/lib/{iconfont.1782112293489.woff2 → iconfont.1782144829906.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -13215,7 +13215,7 @@ function checkDynamic() {
|
|
|
13215
13215
|
;// ./packages/ui/src/log.ts
|
|
13216
13216
|
|
|
13217
13217
|
var log_log = VxeUI.log;
|
|
13218
|
-
var uiVersion = "ui v".concat("3.15.
|
|
13218
|
+
var uiVersion = "ui v".concat("3.15.9");
|
|
13219
13219
|
function createComponentLog(name) {
|
|
13220
13220
|
var tableVersion = VxeUI.tableVersion ? "table v".concat(VxeUI.tableVersion) : '';
|
|
13221
13221
|
var ganttVersion = VxeUI.ganttVersion ? "gantt v".concat(VxeUI.ganttVersion) : '';
|
|
@@ -13232,7 +13232,7 @@ var errLog = log_log.create('error', uiVersion);
|
|
|
13232
13232
|
|
|
13233
13233
|
|
|
13234
13234
|
|
|
13235
|
-
var ui_version = "3.15.
|
|
13235
|
+
var ui_version = "3.15.9";
|
|
13236
13236
|
VxeUI.uiVersion = ui_version;
|
|
13237
13237
|
VxeUI.dynamicApp = dynamicApp;
|
|
13238
13238
|
function config(options) {
|
|
@@ -18635,7 +18635,7 @@ function isAllSameChar(str, char) {
|
|
|
18635
18635
|
}
|
|
18636
18636
|
return true;
|
|
18637
18637
|
}
|
|
18638
|
-
function
|
|
18638
|
+
function checkDateInputFormat(numStr, formatKey) {
|
|
18639
18639
|
var numVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(numStr);
|
|
18640
18640
|
switch (formatKey) {
|
|
18641
18641
|
case 'yyyy':
|
|
@@ -32416,12 +32416,12 @@ var Countdown = VxeCountdown;
|
|
|
32416
32416
|
var isDateTimeType = $xeDatePanel.computeIsDateTimeType;
|
|
32417
32417
|
return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
32418
32418
|
},
|
|
32419
|
-
|
|
32419
|
+
computeDateStartDate: function computeDateStartDate() {
|
|
32420
32420
|
var $xeDatePanel = this;
|
|
32421
32421
|
var props = $xeDatePanel;
|
|
32422
32422
|
return props.startDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.startDate) : null;
|
|
32423
32423
|
},
|
|
32424
|
-
|
|
32424
|
+
computeDateEndDate: function computeDateEndDate() {
|
|
32425
32425
|
var $xeDatePanel = this;
|
|
32426
32426
|
var props = $xeDatePanel;
|
|
32427
32427
|
return props.endDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.endDate) : null;
|
|
@@ -32506,7 +32506,7 @@ var Countdown = VxeCountdown;
|
|
|
32506
32506
|
computeIsDisabledPrevDateBtn: function computeIsDisabledPrevDateBtn() {
|
|
32507
32507
|
var $xeDatePanel = this;
|
|
32508
32508
|
var reactData = $xeDatePanel.reactData;
|
|
32509
|
-
var dateStartTime = $xeDatePanel.
|
|
32509
|
+
var dateStartTime = $xeDatePanel.computeDateStartDate;
|
|
32510
32510
|
var selectMonth = reactData.selectMonth;
|
|
32511
32511
|
if (selectMonth && dateStartTime) {
|
|
32512
32512
|
return selectMonth <= dateStartTime;
|
|
@@ -32516,7 +32516,7 @@ var Countdown = VxeCountdown;
|
|
|
32516
32516
|
computeIsDisabledNextDateBtn: function computeIsDisabledNextDateBtn() {
|
|
32517
32517
|
var $xeDatePanel = this;
|
|
32518
32518
|
var reactData = $xeDatePanel.reactData;
|
|
32519
|
-
var dateEndTime = $xeDatePanel.
|
|
32519
|
+
var dateEndTime = $xeDatePanel.computeDateEndDate;
|
|
32520
32520
|
var selectMonth = reactData.selectMonth;
|
|
32521
32521
|
if (selectMonth && dateEndTime) {
|
|
32522
32522
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, 0, 'last') >= dateEndTime;
|
|
@@ -33006,6 +33006,8 @@ var Countdown = VxeCountdown;
|
|
|
33006
33006
|
var inputLabel = reactData.inputLabel,
|
|
33007
33007
|
datetimePanelValue = reactData.datetimePanelValue;
|
|
33008
33008
|
var dateLabelFormat = $xeDatePanel.computeDateLabelFormat;
|
|
33009
|
+
var dateStartDate = $xeDatePanel.computeDateStartDate;
|
|
33010
|
+
var dateEndDate = $xeDatePanel.computeDateEndDate;
|
|
33009
33011
|
if (inpVal) {
|
|
33010
33012
|
var inpDateVal = $xeDatePanel.parseDate(inpVal, dateLabelFormat);
|
|
33011
33013
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(inpDateVal)) {
|
|
@@ -33018,6 +33020,12 @@ var Countdown = VxeCountdown;
|
|
|
33018
33020
|
}
|
|
33019
33021
|
reactData.inputLabel = inpDateVal;
|
|
33020
33022
|
} else {
|
|
33023
|
+
if (dateEndDate && inpDateVal > dateEndDate) {
|
|
33024
|
+
inpDateVal = dateEndDate;
|
|
33025
|
+
}
|
|
33026
|
+
if (dateStartDate && inpDateVal < dateStartDate) {
|
|
33027
|
+
inpDateVal = dateStartDate;
|
|
33028
|
+
}
|
|
33021
33029
|
var isChange = false;
|
|
33022
33030
|
var firstDayOfWeek = $xeDatePanel.computeFirstDayOfWeek;
|
|
33023
33031
|
if (type === 'datetime') {
|
|
@@ -33387,8 +33395,8 @@ var Countdown = VxeCountdown;
|
|
|
33387
33395
|
},
|
|
33388
33396
|
isRangeDisabled: function isRangeDisabled(item) {
|
|
33389
33397
|
var $xeDatePanel = this;
|
|
33390
|
-
var dateStartTime = $xeDatePanel.
|
|
33391
|
-
var dateEndTime = $xeDatePanel.
|
|
33398
|
+
var dateStartTime = $xeDatePanel.computeDateStartDate;
|
|
33399
|
+
var dateEndTime = $xeDatePanel.computeDateEndDate;
|
|
33392
33400
|
var date = item.date;
|
|
33393
33401
|
if (dateStartTime && dateStartTime.getTime() > date.getTime()) {
|
|
33394
33402
|
return true;
|
|
@@ -34408,6 +34416,7 @@ var DatePanel = VxeDatePanel;
|
|
|
34408
34416
|
var date_picker_createComponentLog = createComponentLog('date-picker'),
|
|
34409
34417
|
date_picker_warnLog = date_picker_createComponentLog.warnLog,
|
|
34410
34418
|
date_picker_errLog = date_picker_createComponentLog.errLog;
|
|
34419
|
+
var defaultMaskPlaceholder = '*';
|
|
34411
34420
|
var maskedTypes = ['year', 'month', 'date', 'datetime', 'time'];
|
|
34412
34421
|
var inputMaskedKeys = ['y', 'M', 'd', 'H', 'm', 'n', 's'];
|
|
34413
34422
|
var parseInputKayMaps = {};
|
|
@@ -34430,6 +34439,7 @@ function date_picker_createReactData() {
|
|
|
34430
34439
|
function date_picker_createInternalData() {
|
|
34431
34440
|
return {
|
|
34432
34441
|
// hpTimeout: undefined,
|
|
34442
|
+
// fsTimeout: undefined,
|
|
34433
34443
|
inputLabel: '',
|
|
34434
34444
|
laseFocusMasked: 0
|
|
34435
34445
|
};
|
|
@@ -34837,7 +34847,7 @@ function date_picker_createInternalData() {
|
|
|
34837
34847
|
var $xeDatePicker = this;
|
|
34838
34848
|
var maskedOpts = $xeDatePicker.computeMaskedOpts;
|
|
34839
34849
|
var maskPlaceholder = maskedOpts.maskPlaceholder;
|
|
34840
|
-
return (maskPlaceholder ? ('' + maskPlaceholder)[0] : '') ||
|
|
34850
|
+
return (maskPlaceholder ? ('' + maskPlaceholder)[0] : '') || defaultMaskPlaceholder;
|
|
34841
34851
|
}
|
|
34842
34852
|
}),
|
|
34843
34853
|
methods: {
|
|
@@ -35074,6 +35084,8 @@ function date_picker_createInternalData() {
|
|
|
35074
35084
|
var inputLabel = internalData.inputLabel;
|
|
35075
35085
|
var dateLabelFormat = $xeDatePicker.computeDateLabelFormat;
|
|
35076
35086
|
var maskedOpts = $xeDatePicker.computeMaskedOpts;
|
|
35087
|
+
var dateStartDate = $xeDatePicker.computeDateStartDate;
|
|
35088
|
+
var dateEndDate = $xeDatePicker.computeDateEndDate;
|
|
35077
35089
|
if (!inpVal) {
|
|
35078
35090
|
$xeDatePicker.handleChange('', {
|
|
35079
35091
|
type: 'check'
|
|
@@ -35087,12 +35099,16 @@ function date_picker_createInternalData() {
|
|
|
35087
35099
|
allMaskedKeys.forEach(function (formatKey) {
|
|
35088
35100
|
var fkIndex = dateLabelFormat.indexOf(formatKey);
|
|
35089
35101
|
if (fkIndex > -1) {
|
|
35090
|
-
var
|
|
35102
|
+
var valStr = inpVal.slice(fkIndex, fkIndex + formatKey.length).replace(/\D/g, '');
|
|
35103
|
+
if (!valStr) {
|
|
35104
|
+
return;
|
|
35105
|
+
}
|
|
35106
|
+
var valNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(valStr);
|
|
35091
35107
|
// 自动纠错最小值
|
|
35092
|
-
if (!
|
|
35093
|
-
|
|
35108
|
+
if (!valNum && ['MM', 'dd'].includes(formatKey)) {
|
|
35109
|
+
valNum = 1;
|
|
35094
35110
|
}
|
|
35095
|
-
inpVal = inpVal.slice(0, fkIndex) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().padStart(
|
|
35111
|
+
inpVal = inpVal.slice(0, fkIndex) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().padStart(checkDateInputFormat(valNum, formatKey), formatKey.length, '0') + inpVal.slice(fkIndex + formatKey.length);
|
|
35096
35112
|
}
|
|
35097
35113
|
});
|
|
35098
35114
|
}
|
|
@@ -35118,6 +35134,12 @@ function date_picker_createInternalData() {
|
|
|
35118
35134
|
$xeDatePicker.handleInputLabel(inpDateVal, true);
|
|
35119
35135
|
return;
|
|
35120
35136
|
}
|
|
35137
|
+
if (dateEndDate && inpDateVal > dateEndDate) {
|
|
35138
|
+
inpDateVal = dateEndDate;
|
|
35139
|
+
}
|
|
35140
|
+
if (dateStartDate && inpDateVal < dateStartDate) {
|
|
35141
|
+
inpDateVal = dateStartDate;
|
|
35142
|
+
}
|
|
35121
35143
|
var isChange = false;
|
|
35122
35144
|
var firstDayOfWeek = $xeDatePicker.computeFirstDayOfWeek;
|
|
35123
35145
|
if (type === 'datetime') {
|
|
@@ -35163,9 +35185,20 @@ function date_picker_createInternalData() {
|
|
|
35163
35185
|
var maskedOpts = $xeDatePicker.computeMaskedOpts;
|
|
35164
35186
|
var align = maskedOpts.align;
|
|
35165
35187
|
var maskChar = $xeDatePicker.computeMaskChar;
|
|
35166
|
-
var
|
|
35188
|
+
var numVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(numStr);
|
|
35189
|
+
var restVal = checkDateInputFormat(numVal, chunkFormat);
|
|
35167
35190
|
if (isFull) {
|
|
35168
|
-
|
|
35191
|
+
// 自动纠错最小值
|
|
35192
|
+
if (!restVal && ['MM', 'dd'].includes(chunkFormat)) {
|
|
35193
|
+
restVal = 1;
|
|
35194
|
+
}
|
|
35195
|
+
}
|
|
35196
|
+
var restStr = '' + restVal;
|
|
35197
|
+
if (numStr.length > restStr.length) {
|
|
35198
|
+
restStr = restStr.padStart(numStr.length, '0');
|
|
35199
|
+
}
|
|
35200
|
+
if (isFull) {
|
|
35201
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().padStart(restStr, chunkFormat.length, '0');
|
|
35169
35202
|
}
|
|
35170
35203
|
return (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[align === 'right' ? 'padStart' : 'padEnd'](restVal, chunkFormat.length, maskChar);
|
|
35171
35204
|
},
|
|
@@ -35206,7 +35239,7 @@ function date_picker_createInternalData() {
|
|
|
35206
35239
|
var chunkValue = inpValue.slice(chunkStartIndex, chunkEndIndex);
|
|
35207
35240
|
if (parseInputKayMaps[selectKey]) {
|
|
35208
35241
|
var chunkNum = (isAllSameChar(chunkValue, maskChar) ? getChunkDefaultNum(selectKey) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(chunkValue)) + (isUpArrow ? 1 : -1);
|
|
35209
|
-
var restValue = inpValue.slice(0, chunkStartIndex) + $xeDatePicker.checkMaskedInputValue(chunkNum, chunkFormat, true) + inpValue.slice(chunkEndIndex);
|
|
35242
|
+
var restValue = inpValue.slice(0, chunkStartIndex) + $xeDatePicker.checkMaskedInputValue('' + chunkNum, chunkFormat, true) + inpValue.slice(chunkEndIndex);
|
|
35210
35243
|
evnt.preventDefault();
|
|
35211
35244
|
if (restValue.indexOf(maskChar) === -1) {
|
|
35212
35245
|
// 解析日期
|
|
@@ -35394,6 +35427,7 @@ function date_picker_createInternalData() {
|
|
|
35394
35427
|
var type = props.type,
|
|
35395
35428
|
multiple = props.multiple,
|
|
35396
35429
|
modelValue = props.value;
|
|
35430
|
+
internalData.fsTimeout = undefined;
|
|
35397
35431
|
if (multiple) {
|
|
35398
35432
|
return;
|
|
35399
35433
|
}
|
|
@@ -35514,6 +35548,8 @@ function date_picker_createInternalData() {
|
|
|
35514
35548
|
var $xeDatePicker = this;
|
|
35515
35549
|
var props = $xeDatePicker;
|
|
35516
35550
|
var reactData = $xeDatePicker.reactData;
|
|
35551
|
+
var internalData = $xeDatePicker.internalData;
|
|
35552
|
+
var fsTimeout = internalData.fsTimeout;
|
|
35517
35553
|
var multiple = props.multiple,
|
|
35518
35554
|
editable = props.editable,
|
|
35519
35555
|
maskedConfig = props.maskedConfig;
|
|
@@ -35521,35 +35557,37 @@ function date_picker_createInternalData() {
|
|
|
35521
35557
|
var popupOpts = $xeDatePicker.computePopupOpts;
|
|
35522
35558
|
var trigger = popupOpts.trigger;
|
|
35523
35559
|
reactData.isActivated = true;
|
|
35560
|
+
if (fsTimeout) {
|
|
35561
|
+
clearTimeout(fsTimeout);
|
|
35562
|
+
}
|
|
35524
35563
|
if (!trigger || trigger === 'default') {
|
|
35525
35564
|
$xeDatePicker.datePickerOpenEvent(evnt);
|
|
35526
|
-
setTimeout(function () {
|
|
35527
|
-
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
35528
|
-
$xeDatePicker.handleMaskedSelectedDate(evnt, true);
|
|
35529
|
-
}
|
|
35530
|
-
}, 15);
|
|
35531
35565
|
} else if (trigger === 'icon') {
|
|
35532
35566
|
$xeDatePicker.hidePanel();
|
|
35533
|
-
|
|
35534
|
-
|
|
35535
|
-
|
|
35536
|
-
}
|
|
35537
|
-
}, 15);
|
|
35538
|
-
} else {
|
|
35539
|
-
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
35567
|
+
}
|
|
35568
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
35569
|
+
internalData.fsTimeout = setTimeout(function () {
|
|
35540
35570
|
$xeDatePicker.handleMaskedSelectedDate(evnt, true);
|
|
35541
|
-
}
|
|
35571
|
+
}, 20);
|
|
35542
35572
|
}
|
|
35543
35573
|
$xeDatePicker.triggerEvent(evnt);
|
|
35544
35574
|
},
|
|
35545
35575
|
clickEvent: function clickEvent(evnt) {
|
|
35546
35576
|
var $xeDatePicker = this;
|
|
35547
35577
|
var props = $xeDatePicker;
|
|
35548
|
-
var
|
|
35578
|
+
var internalData = $xeDatePicker.internalData;
|
|
35579
|
+
var multiple = props.multiple,
|
|
35580
|
+
editable = props.editable,
|
|
35549
35581
|
maskedConfig = props.maskedConfig;
|
|
35582
|
+
var fsTimeout = internalData.fsTimeout;
|
|
35550
35583
|
var maskedOpts = $xeDatePicker.computeMaskedOpts;
|
|
35551
|
-
if (
|
|
35552
|
-
|
|
35584
|
+
if (fsTimeout) {
|
|
35585
|
+
clearTimeout(fsTimeout);
|
|
35586
|
+
}
|
|
35587
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
35588
|
+
internalData.fsTimeout = setTimeout(function () {
|
|
35589
|
+
$xeDatePicker.handleMaskedSelectedDate(evnt);
|
|
35590
|
+
}, 10);
|
|
35553
35591
|
}
|
|
35554
35592
|
$xeDatePicker.triggerEvent(evnt);
|
|
35555
35593
|
},
|
|
@@ -64525,7 +64563,6 @@ function upload_createInternalData() {
|
|
|
64525
64563
|
var $xeForm = $xeUpload.$xeForm;
|
|
64526
64564
|
var formItemInfo = $xeUpload.formItemInfo;
|
|
64527
64565
|
var multiple = props.multiple,
|
|
64528
|
-
urlMode = props.urlMode,
|
|
64529
64566
|
showLimitSize = props.showLimitSize,
|
|
64530
64567
|
limitSizeText = props.limitSizeText,
|
|
64531
64568
|
showLimitCount = props.showLimitCount,
|
|
@@ -64645,7 +64682,7 @@ function upload_createInternalData() {
|
|
|
64645
64682
|
option: item
|
|
64646
64683
|
}, evnt);
|
|
64647
64684
|
});
|
|
64648
|
-
Promise.all(
|
|
64685
|
+
Promise.all(uploadPromiseRests).then(function () {
|
|
64649
64686
|
var restFileList = reactData.fileList;
|
|
64650
64687
|
$xeUpload.dispatchEvent('upload-queue-end', {
|
|
64651
64688
|
options: restFileList,
|