vxe-pc-ui 3.15.8 → 3.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/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 +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 +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 +77 -37
- 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 +55 -26
- package/packages/ui/src/log.ts +3 -2
- package/types/components/date-picker.d.ts +1 -0
- package/types/components/table.d.ts +13 -0
- /package/es/icon/{iconfont.1782137675936.ttf → iconfont.1782286917398.ttf} +0 -0
- /package/es/icon/{iconfont.1782137675936.woff → iconfont.1782286917398.woff} +0 -0
- /package/es/icon/{iconfont.1782137675936.woff2 → iconfont.1782286917398.woff2} +0 -0
- /package/es/{iconfont.1782137675936.ttf → iconfont.1782286917398.ttf} +0 -0
- /package/es/{iconfont.1782137675936.woff → iconfont.1782286917398.woff} +0 -0
- /package/es/{iconfont.1782137675936.woff2 → iconfont.1782286917398.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1782137675936.ttf → iconfont.1782286917398.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1782137675936.woff → iconfont.1782286917398.woff} +0 -0
- /package/lib/icon/style/{iconfont.1782137675936.woff2 → iconfont.1782286917398.woff2} +0 -0
- /package/lib/{iconfont.1782137675936.ttf → iconfont.1782286917398.ttf} +0 -0
- /package/lib/{iconfont.1782137675936.woff → iconfont.1782286917398.woff} +0 -0
- /package/lib/{iconfont.1782137675936.woff2 → iconfont.1782286917398.woff2} +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -13212,17 +13212,21 @@ function checkDynamic() {
|
|
|
13212
13212
|
dynamicStore.$mount(dynamicContainerElem);
|
|
13213
13213
|
}
|
|
13214
13214
|
}
|
|
13215
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
|
|
13216
|
+
var es_array_join = __webpack_require__(8598);
|
|
13215
13217
|
;// ./packages/ui/src/log.ts
|
|
13216
13218
|
|
|
13219
|
+
|
|
13217
13220
|
var log_log = VxeUI.log;
|
|
13218
|
-
var uiVersion = "ui v".concat("3.15.
|
|
13221
|
+
var uiVersion = "ui v".concat("3.15.10");
|
|
13219
13222
|
function createComponentLog(name) {
|
|
13220
13223
|
var tableVersion = VxeUI.tableVersion ? "table v".concat(VxeUI.tableVersion) : '';
|
|
13221
13224
|
var ganttVersion = VxeUI.ganttVersion ? "gantt v".concat(VxeUI.ganttVersion) : '';
|
|
13222
13225
|
var designVersion = VxeUI.designVersion ? "design v".concat(VxeUI.designVersion) : '';
|
|
13226
|
+
var versionInfo = [uiVersion, tableVersion, ganttVersion, designVersion].join(' ');
|
|
13223
13227
|
return {
|
|
13224
|
-
warnLog: log_log.create('warn',
|
|
13225
|
-
errLog: log_log.create('error',
|
|
13228
|
+
warnLog: log_log.create('warn', versionInfo + '] [' + name),
|
|
13229
|
+
errLog: log_log.create('error', versionInfo + '] [' + name)
|
|
13226
13230
|
};
|
|
13227
13231
|
}
|
|
13228
13232
|
var warnLog = log_log.create('warn', uiVersion);
|
|
@@ -13232,7 +13236,7 @@ var errLog = log_log.create('error', uiVersion);
|
|
|
13232
13236
|
|
|
13233
13237
|
|
|
13234
13238
|
|
|
13235
|
-
var ui_version = "3.15.
|
|
13239
|
+
var ui_version = "3.15.10";
|
|
13236
13240
|
VxeUI.uiVersion = ui_version;
|
|
13237
13241
|
VxeUI.dynamicApp = dynamicApp;
|
|
13238
13242
|
function config(options) {
|
|
@@ -14922,8 +14926,6 @@ dynamicApp.use(VxeAlert);
|
|
|
14922
14926
|
VxeUI.component(src_alert);
|
|
14923
14927
|
var Alert = VxeAlert;
|
|
14924
14928
|
/* harmony default export */ var packages_alert = (VxeAlert);
|
|
14925
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
|
|
14926
|
-
var es_array_join = __webpack_require__(8598);
|
|
14927
14929
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
|
|
14928
14930
|
var es_string_replace = __webpack_require__(5440);
|
|
14929
14931
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.constructor.js
|
|
@@ -18635,7 +18637,7 @@ function isAllSameChar(str, char) {
|
|
|
18635
18637
|
}
|
|
18636
18638
|
return true;
|
|
18637
18639
|
}
|
|
18638
|
-
function
|
|
18640
|
+
function checkDateInputFormat(numStr, formatKey) {
|
|
18639
18641
|
var numVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(numStr);
|
|
18640
18642
|
switch (formatKey) {
|
|
18641
18643
|
case 'yyyy':
|
|
@@ -32416,12 +32418,12 @@ var Countdown = VxeCountdown;
|
|
|
32416
32418
|
var isDateTimeType = $xeDatePanel.computeIsDateTimeType;
|
|
32417
32419
|
return isDateTimeType || ['date', 'week', 'month', 'quarter', 'year'].indexOf(props.type) > -1;
|
|
32418
32420
|
},
|
|
32419
|
-
|
|
32421
|
+
computeDateStartDate: function computeDateStartDate() {
|
|
32420
32422
|
var $xeDatePanel = this;
|
|
32421
32423
|
var props = $xeDatePanel;
|
|
32422
32424
|
return props.startDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.startDate) : null;
|
|
32423
32425
|
},
|
|
32424
|
-
|
|
32426
|
+
computeDateEndDate: function computeDateEndDate() {
|
|
32425
32427
|
var $xeDatePanel = this;
|
|
32426
32428
|
var props = $xeDatePanel;
|
|
32427
32429
|
return props.endDate ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toStringDate(props.endDate) : null;
|
|
@@ -32506,7 +32508,7 @@ var Countdown = VxeCountdown;
|
|
|
32506
32508
|
computeIsDisabledPrevDateBtn: function computeIsDisabledPrevDateBtn() {
|
|
32507
32509
|
var $xeDatePanel = this;
|
|
32508
32510
|
var reactData = $xeDatePanel.reactData;
|
|
32509
|
-
var dateStartTime = $xeDatePanel.
|
|
32511
|
+
var dateStartTime = $xeDatePanel.computeDateStartDate;
|
|
32510
32512
|
var selectMonth = reactData.selectMonth;
|
|
32511
32513
|
if (selectMonth && dateStartTime) {
|
|
32512
32514
|
return selectMonth <= dateStartTime;
|
|
@@ -32516,7 +32518,7 @@ var Countdown = VxeCountdown;
|
|
|
32516
32518
|
computeIsDisabledNextDateBtn: function computeIsDisabledNextDateBtn() {
|
|
32517
32519
|
var $xeDatePanel = this;
|
|
32518
32520
|
var reactData = $xeDatePanel.reactData;
|
|
32519
|
-
var dateEndTime = $xeDatePanel.
|
|
32521
|
+
var dateEndTime = $xeDatePanel.computeDateEndDate;
|
|
32520
32522
|
var selectMonth = reactData.selectMonth;
|
|
32521
32523
|
if (selectMonth && dateEndTime) {
|
|
32522
32524
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().getWhatMonth(selectMonth, 0, 'last') >= dateEndTime;
|
|
@@ -33006,6 +33008,8 @@ var Countdown = VxeCountdown;
|
|
|
33006
33008
|
var inputLabel = reactData.inputLabel,
|
|
33007
33009
|
datetimePanelValue = reactData.datetimePanelValue;
|
|
33008
33010
|
var dateLabelFormat = $xeDatePanel.computeDateLabelFormat;
|
|
33011
|
+
var dateStartDate = $xeDatePanel.computeDateStartDate;
|
|
33012
|
+
var dateEndDate = $xeDatePanel.computeDateEndDate;
|
|
33009
33013
|
if (inpVal) {
|
|
33010
33014
|
var inpDateVal = $xeDatePanel.parseDate(inpVal, dateLabelFormat);
|
|
33011
33015
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isValidDate(inpDateVal)) {
|
|
@@ -33018,6 +33022,12 @@ var Countdown = VxeCountdown;
|
|
|
33018
33022
|
}
|
|
33019
33023
|
reactData.inputLabel = inpDateVal;
|
|
33020
33024
|
} else {
|
|
33025
|
+
if (dateEndDate && inpDateVal > dateEndDate) {
|
|
33026
|
+
inpDateVal = dateEndDate;
|
|
33027
|
+
}
|
|
33028
|
+
if (dateStartDate && inpDateVal < dateStartDate) {
|
|
33029
|
+
inpDateVal = dateStartDate;
|
|
33030
|
+
}
|
|
33021
33031
|
var isChange = false;
|
|
33022
33032
|
var firstDayOfWeek = $xeDatePanel.computeFirstDayOfWeek;
|
|
33023
33033
|
if (type === 'datetime') {
|
|
@@ -33387,8 +33397,8 @@ var Countdown = VxeCountdown;
|
|
|
33387
33397
|
},
|
|
33388
33398
|
isRangeDisabled: function isRangeDisabled(item) {
|
|
33389
33399
|
var $xeDatePanel = this;
|
|
33390
|
-
var dateStartTime = $xeDatePanel.
|
|
33391
|
-
var dateEndTime = $xeDatePanel.
|
|
33400
|
+
var dateStartTime = $xeDatePanel.computeDateStartDate;
|
|
33401
|
+
var dateEndTime = $xeDatePanel.computeDateEndDate;
|
|
33392
33402
|
var date = item.date;
|
|
33393
33403
|
if (dateStartTime && dateStartTime.getTime() > date.getTime()) {
|
|
33394
33404
|
return true;
|
|
@@ -34408,6 +34418,7 @@ var DatePanel = VxeDatePanel;
|
|
|
34408
34418
|
var date_picker_createComponentLog = createComponentLog('date-picker'),
|
|
34409
34419
|
date_picker_warnLog = date_picker_createComponentLog.warnLog,
|
|
34410
34420
|
date_picker_errLog = date_picker_createComponentLog.errLog;
|
|
34421
|
+
var defaultMaskPlaceholder = '*';
|
|
34411
34422
|
var maskedTypes = ['year', 'month', 'date', 'datetime', 'time'];
|
|
34412
34423
|
var inputMaskedKeys = ['y', 'M', 'd', 'H', 'm', 'n', 's'];
|
|
34413
34424
|
var parseInputKayMaps = {};
|
|
@@ -34430,6 +34441,7 @@ function date_picker_createReactData() {
|
|
|
34430
34441
|
function date_picker_createInternalData() {
|
|
34431
34442
|
return {
|
|
34432
34443
|
// hpTimeout: undefined,
|
|
34444
|
+
// fsTimeout: undefined,
|
|
34433
34445
|
inputLabel: '',
|
|
34434
34446
|
laseFocusMasked: 0
|
|
34435
34447
|
};
|
|
@@ -34837,7 +34849,7 @@ function date_picker_createInternalData() {
|
|
|
34837
34849
|
var $xeDatePicker = this;
|
|
34838
34850
|
var maskedOpts = $xeDatePicker.computeMaskedOpts;
|
|
34839
34851
|
var maskPlaceholder = maskedOpts.maskPlaceholder;
|
|
34840
|
-
return (maskPlaceholder ? ('' + maskPlaceholder)[0] : '') ||
|
|
34852
|
+
return (maskPlaceholder ? ('' + maskPlaceholder)[0] : '') || defaultMaskPlaceholder;
|
|
34841
34853
|
}
|
|
34842
34854
|
}),
|
|
34843
34855
|
methods: {
|
|
@@ -35074,6 +35086,8 @@ function date_picker_createInternalData() {
|
|
|
35074
35086
|
var inputLabel = internalData.inputLabel;
|
|
35075
35087
|
var dateLabelFormat = $xeDatePicker.computeDateLabelFormat;
|
|
35076
35088
|
var maskedOpts = $xeDatePicker.computeMaskedOpts;
|
|
35089
|
+
var dateStartDate = $xeDatePicker.computeDateStartDate;
|
|
35090
|
+
var dateEndDate = $xeDatePicker.computeDateEndDate;
|
|
35077
35091
|
if (!inpVal) {
|
|
35078
35092
|
$xeDatePicker.handleChange('', {
|
|
35079
35093
|
type: 'check'
|
|
@@ -35087,12 +35101,16 @@ function date_picker_createInternalData() {
|
|
|
35087
35101
|
allMaskedKeys.forEach(function (formatKey) {
|
|
35088
35102
|
var fkIndex = dateLabelFormat.indexOf(formatKey);
|
|
35089
35103
|
if (fkIndex > -1) {
|
|
35090
|
-
var
|
|
35104
|
+
var valStr = inpVal.slice(fkIndex, fkIndex + formatKey.length).replace(/\D/g, '');
|
|
35105
|
+
if (!valStr) {
|
|
35106
|
+
return;
|
|
35107
|
+
}
|
|
35108
|
+
var valNum = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(valStr);
|
|
35091
35109
|
// 自动纠错最小值
|
|
35092
|
-
if (!
|
|
35093
|
-
|
|
35110
|
+
if (!valNum && ['MM', 'dd'].includes(formatKey)) {
|
|
35111
|
+
valNum = 1;
|
|
35094
35112
|
}
|
|
35095
|
-
inpVal = inpVal.slice(0, fkIndex) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().padStart(
|
|
35113
|
+
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
35114
|
}
|
|
35097
35115
|
});
|
|
35098
35116
|
}
|
|
@@ -35118,6 +35136,12 @@ function date_picker_createInternalData() {
|
|
|
35118
35136
|
$xeDatePicker.handleInputLabel(inpDateVal, true);
|
|
35119
35137
|
return;
|
|
35120
35138
|
}
|
|
35139
|
+
if (dateEndDate && inpDateVal > dateEndDate) {
|
|
35140
|
+
inpDateVal = dateEndDate;
|
|
35141
|
+
}
|
|
35142
|
+
if (dateStartDate && inpDateVal < dateStartDate) {
|
|
35143
|
+
inpDateVal = dateStartDate;
|
|
35144
|
+
}
|
|
35121
35145
|
var isChange = false;
|
|
35122
35146
|
var firstDayOfWeek = $xeDatePicker.computeFirstDayOfWeek;
|
|
35123
35147
|
if (type === 'datetime') {
|
|
@@ -35163,9 +35187,20 @@ function date_picker_createInternalData() {
|
|
|
35163
35187
|
var maskedOpts = $xeDatePicker.computeMaskedOpts;
|
|
35164
35188
|
var align = maskedOpts.align;
|
|
35165
35189
|
var maskChar = $xeDatePicker.computeMaskChar;
|
|
35166
|
-
var
|
|
35190
|
+
var numVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(numStr);
|
|
35191
|
+
var restVal = checkDateInputFormat(numVal, chunkFormat);
|
|
35167
35192
|
if (isFull) {
|
|
35168
|
-
|
|
35193
|
+
// 自动纠错最小值
|
|
35194
|
+
if (!restVal && ['MM', 'dd'].includes(chunkFormat)) {
|
|
35195
|
+
restVal = 1;
|
|
35196
|
+
}
|
|
35197
|
+
}
|
|
35198
|
+
var restStr = '' + restVal;
|
|
35199
|
+
if (numStr.length > restStr.length) {
|
|
35200
|
+
restStr = restStr.padStart(numStr.length, '0');
|
|
35201
|
+
}
|
|
35202
|
+
if (isFull) {
|
|
35203
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().padStart(restStr, chunkFormat.length, '0');
|
|
35169
35204
|
}
|
|
35170
35205
|
return (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default())[align === 'right' ? 'padStart' : 'padEnd'](restVal, chunkFormat.length, maskChar);
|
|
35171
35206
|
},
|
|
@@ -35206,7 +35241,7 @@ function date_picker_createInternalData() {
|
|
|
35206
35241
|
var chunkValue = inpValue.slice(chunkStartIndex, chunkEndIndex);
|
|
35207
35242
|
if (parseInputKayMaps[selectKey]) {
|
|
35208
35243
|
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);
|
|
35244
|
+
var restValue = inpValue.slice(0, chunkStartIndex) + $xeDatePicker.checkMaskedInputValue('' + chunkNum, chunkFormat, true) + inpValue.slice(chunkEndIndex);
|
|
35210
35245
|
evnt.preventDefault();
|
|
35211
35246
|
if (restValue.indexOf(maskChar) === -1) {
|
|
35212
35247
|
// 解析日期
|
|
@@ -35394,6 +35429,7 @@ function date_picker_createInternalData() {
|
|
|
35394
35429
|
var type = props.type,
|
|
35395
35430
|
multiple = props.multiple,
|
|
35396
35431
|
modelValue = props.value;
|
|
35432
|
+
internalData.fsTimeout = undefined;
|
|
35397
35433
|
if (multiple) {
|
|
35398
35434
|
return;
|
|
35399
35435
|
}
|
|
@@ -35514,6 +35550,8 @@ function date_picker_createInternalData() {
|
|
|
35514
35550
|
var $xeDatePicker = this;
|
|
35515
35551
|
var props = $xeDatePicker;
|
|
35516
35552
|
var reactData = $xeDatePicker.reactData;
|
|
35553
|
+
var internalData = $xeDatePicker.internalData;
|
|
35554
|
+
var fsTimeout = internalData.fsTimeout;
|
|
35517
35555
|
var multiple = props.multiple,
|
|
35518
35556
|
editable = props.editable,
|
|
35519
35557
|
maskedConfig = props.maskedConfig;
|
|
@@ -35521,35 +35559,37 @@ function date_picker_createInternalData() {
|
|
|
35521
35559
|
var popupOpts = $xeDatePicker.computePopupOpts;
|
|
35522
35560
|
var trigger = popupOpts.trigger;
|
|
35523
35561
|
reactData.isActivated = true;
|
|
35562
|
+
if (fsTimeout) {
|
|
35563
|
+
clearTimeout(fsTimeout);
|
|
35564
|
+
}
|
|
35524
35565
|
if (!trigger || trigger === 'default') {
|
|
35525
35566
|
$xeDatePicker.datePickerOpenEvent(evnt);
|
|
35526
|
-
setTimeout(function () {
|
|
35527
|
-
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
35528
|
-
$xeDatePicker.handleMaskedSelectedDate(evnt, true);
|
|
35529
|
-
}
|
|
35530
|
-
}, 15);
|
|
35531
35567
|
} else if (trigger === 'icon') {
|
|
35532
35568
|
$xeDatePicker.hidePanel();
|
|
35533
|
-
|
|
35534
|
-
|
|
35535
|
-
|
|
35536
|
-
}
|
|
35537
|
-
}, 15);
|
|
35538
|
-
} else {
|
|
35539
|
-
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
35569
|
+
}
|
|
35570
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
35571
|
+
internalData.fsTimeout = setTimeout(function () {
|
|
35540
35572
|
$xeDatePicker.handleMaskedSelectedDate(evnt, true);
|
|
35541
|
-
}
|
|
35573
|
+
}, 20);
|
|
35542
35574
|
}
|
|
35543
35575
|
$xeDatePicker.triggerEvent(evnt);
|
|
35544
35576
|
},
|
|
35545
35577
|
clickEvent: function clickEvent(evnt) {
|
|
35546
35578
|
var $xeDatePicker = this;
|
|
35547
35579
|
var props = $xeDatePicker;
|
|
35548
|
-
var
|
|
35580
|
+
var internalData = $xeDatePicker.internalData;
|
|
35581
|
+
var multiple = props.multiple,
|
|
35582
|
+
editable = props.editable,
|
|
35549
35583
|
maskedConfig = props.maskedConfig;
|
|
35584
|
+
var fsTimeout = internalData.fsTimeout;
|
|
35550
35585
|
var maskedOpts = $xeDatePicker.computeMaskedOpts;
|
|
35551
|
-
if (
|
|
35552
|
-
|
|
35586
|
+
if (fsTimeout) {
|
|
35587
|
+
clearTimeout(fsTimeout);
|
|
35588
|
+
}
|
|
35589
|
+
if (editable && !multiple && (isEnableConf(maskedConfig) || maskedOpts.enabled)) {
|
|
35590
|
+
internalData.fsTimeout = setTimeout(function () {
|
|
35591
|
+
$xeDatePicker.handleMaskedSelectedDate(evnt);
|
|
35592
|
+
}, 10);
|
|
35553
35593
|
}
|
|
35554
35594
|
$xeDatePicker.triggerEvent(evnt);
|
|
35555
35595
|
},
|