vxe-table 3.4.12-beta.1 → 3.4.12-beta.2
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/lib/index.umd.js +46 -15
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +46 -17
- package/lib/input/src/input.min.js +1 -1
- package/package.json +3 -3
- package/packages/input/src/input.js +31 -14
package/lib/index.umd.js
CHANGED
|
@@ -24589,13 +24589,16 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
24589
24589
|
|
|
24590
24590
|
return '';
|
|
24591
24591
|
},
|
|
24592
|
+
firstDayOfWeek: function firstDayOfWeek() {
|
|
24593
|
+
var startDay = this.startDay,
|
|
24594
|
+
startWeek = this.startWeek;
|
|
24595
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNumber(startDay) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(startDay) ? startDay : startWeek);
|
|
24596
|
+
},
|
|
24592
24597
|
weekDatas: function weekDatas() {
|
|
24593
24598
|
var weeks = [];
|
|
24594
24599
|
|
|
24595
24600
|
if (this.isDatePickerType) {
|
|
24596
|
-
var
|
|
24597
|
-
startWeek = this.startWeek;
|
|
24598
|
-
var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isNumber(startDay) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isString(startDay) ? startDay : startWeek);
|
|
24601
|
+
var sWeek = this.firstDayOfWeek;
|
|
24599
24602
|
weeks.push(sWeek);
|
|
24600
24603
|
|
|
24601
24604
|
for (var index = 0; index < 6; index++) {
|
|
@@ -24761,7 +24764,9 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
24761
24764
|
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.chunk(this.dayList, 7);
|
|
24762
24765
|
},
|
|
24763
24766
|
weekDates: function weekDates() {
|
|
24764
|
-
|
|
24767
|
+
var dayDatas = this.dayDatas,
|
|
24768
|
+
firstDayOfWeek = this.firstDayOfWeek;
|
|
24769
|
+
return dayDatas.map(function (list) {
|
|
24765
24770
|
var firstItem = list[0];
|
|
24766
24771
|
var item = {
|
|
24767
24772
|
date: firstItem.date,
|
|
@@ -24770,7 +24775,7 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
24770
24775
|
isCurrent: false,
|
|
24771
24776
|
isNow: false,
|
|
24772
24777
|
isNext: false,
|
|
24773
|
-
label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getYearWeek(firstItem.date)
|
|
24778
|
+
label: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getYearWeek(firstItem.date, firstDayOfWeek)
|
|
24774
24779
|
};
|
|
24775
24780
|
return [item].concat(list);
|
|
24776
24781
|
});
|
|
@@ -25204,7 +25209,8 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
25204
25209
|
datetimePanelValue = this.datetimePanelValue,
|
|
25205
25210
|
dateLabelFormat = this.dateLabelFormat,
|
|
25206
25211
|
min = this.min,
|
|
25207
|
-
max = this.max
|
|
25212
|
+
max = this.max,
|
|
25213
|
+
firstDayOfWeek = this.firstDayOfWeek;
|
|
25208
25214
|
|
|
25209
25215
|
if (!inpReadonly) {
|
|
25210
25216
|
if (isNumType) {
|
|
@@ -25266,7 +25272,9 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
25266
25272
|
isChange = true;
|
|
25267
25273
|
}
|
|
25268
25274
|
|
|
25269
|
-
this.inputValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(inpDateVal, dateLabelFormat
|
|
25275
|
+
this.inputValue = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(inpDateVal, dateLabelFormat, {
|
|
25276
|
+
firstDay: firstDayOfWeek
|
|
25277
|
+
});
|
|
25270
25278
|
|
|
25271
25279
|
if (isChange) {
|
|
25272
25280
|
this.dateChange(inpDateVal);
|
|
@@ -25659,7 +25667,8 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
25659
25667
|
dateParseValue: function dateParseValue(date) {
|
|
25660
25668
|
var type = this.type,
|
|
25661
25669
|
dateLabelFormat = this.dateLabelFormat,
|
|
25662
|
-
valueFormat = this.valueFormat
|
|
25670
|
+
valueFormat = this.valueFormat,
|
|
25671
|
+
firstDayOfWeek = this.firstDayOfWeek;
|
|
25663
25672
|
var dValue = null;
|
|
25664
25673
|
var dLabel = '';
|
|
25665
25674
|
|
|
@@ -25672,7 +25681,25 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
25672
25681
|
}
|
|
25673
25682
|
|
|
25674
25683
|
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isValidDate(dValue)) {
|
|
25675
|
-
dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(dValue, dateLabelFormat
|
|
25684
|
+
dLabel = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(dValue, dateLabelFormat, {
|
|
25685
|
+
firstDay: firstDayOfWeek
|
|
25686
|
+
}); // 由于年份和第几周是冲突的行为,所以需要特殊处理,判断是否跨年
|
|
25687
|
+
|
|
25688
|
+
if (dateLabelFormat && type === 'week') {
|
|
25689
|
+
var firstWeekDate = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(dValue, 0, firstDayOfWeek, firstDayOfWeek);
|
|
25690
|
+
|
|
25691
|
+
if (firstWeekDate.getFullYear() < dValue.getFullYear()) {
|
|
25692
|
+
var yyIndex = dateLabelFormat.indexOf('yyyy');
|
|
25693
|
+
|
|
25694
|
+
if (yyIndex > -1) {
|
|
25695
|
+
var yyNum = Number(dLabel.substring(yyIndex, yyIndex + 4));
|
|
25696
|
+
|
|
25697
|
+
if (yyNum && !isNaN(yyNum)) {
|
|
25698
|
+
dLabel = dLabel.replace("".concat(yyNum), "".concat(yyNum - 1));
|
|
25699
|
+
}
|
|
25700
|
+
}
|
|
25701
|
+
}
|
|
25702
|
+
}
|
|
25676
25703
|
} else {
|
|
25677
25704
|
dValue = null;
|
|
25678
25705
|
}
|
|
@@ -25683,7 +25710,8 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
25683
25710
|
dateOffsetEvent: function dateOffsetEvent(evnt) {
|
|
25684
25711
|
var isActivated = this.isActivated,
|
|
25685
25712
|
datePanelValue = this.datePanelValue,
|
|
25686
|
-
datePanelType = this.datePanelType
|
|
25713
|
+
datePanelType = this.datePanelType,
|
|
25714
|
+
firstDayOfWeek = this.firstDayOfWeek;
|
|
25687
25715
|
|
|
25688
25716
|
if (isActivated) {
|
|
25689
25717
|
evnt.preventDefault();
|
|
@@ -25741,11 +25769,11 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
25741
25769
|
if (isLeftArrow) {
|
|
25742
25770
|
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatDay(offsetDay, -1);
|
|
25743
25771
|
} else if (isUpArrow) {
|
|
25744
|
-
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, -1);
|
|
25772
|
+
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, -1, firstDayOfWeek);
|
|
25745
25773
|
} else if (isRightArrow) {
|
|
25746
25774
|
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatDay(offsetDay, 1);
|
|
25747
25775
|
} else if (isDwArrow) {
|
|
25748
|
-
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, 1);
|
|
25776
|
+
offsetDay = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(offsetDay, 1, firstDayOfWeek);
|
|
25749
25777
|
}
|
|
25750
25778
|
|
|
25751
25779
|
this.dateMoveDay(offsetDay);
|
|
@@ -25769,18 +25797,21 @@ function renderExtraSuffixIcon(h, _vm) {
|
|
|
25769
25797
|
dateChange: function dateChange(date) {
|
|
25770
25798
|
var value = this.value,
|
|
25771
25799
|
datetimePanelValue = this.datetimePanelValue,
|
|
25772
|
-
dateValueFormat = this.dateValueFormat
|
|
25800
|
+
dateValueFormat = this.dateValueFormat,
|
|
25801
|
+
firstDayOfWeek = this.firstDayOfWeek;
|
|
25773
25802
|
|
|
25774
25803
|
if (this.type === 'week') {
|
|
25775
25804
|
var sWeek = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toNumber(this.selectDay);
|
|
25776
|
-
date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(date, 0, sWeek);
|
|
25805
|
+
date = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.getWhatWeek(date, 0, sWeek, firstDayOfWeek);
|
|
25777
25806
|
} else if (this.hasTime) {
|
|
25778
25807
|
date.setHours(datetimePanelValue.getHours());
|
|
25779
25808
|
date.setMinutes(datetimePanelValue.getMinutes());
|
|
25780
25809
|
date.setSeconds(datetimePanelValue.getSeconds());
|
|
25781
25810
|
}
|
|
25782
25811
|
|
|
25783
|
-
var inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(date, dateValueFormat
|
|
25812
|
+
var inpVal = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.toDateString(date, dateValueFormat, {
|
|
25813
|
+
firstDay: firstDayOfWeek
|
|
25814
|
+
});
|
|
25784
25815
|
this.dateCheckMonth(date);
|
|
25785
25816
|
|
|
25786
25817
|
if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default.a.isEqual(value, inpVal)) {
|