bk-magic-vue 2.5.8-beta.1 → 2.5.8-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/dist/bk-magic-vue.js
CHANGED
|
@@ -9592,6 +9592,12 @@
|
|
|
9592
9592
|
|
|
9593
9593
|
var script$l = {
|
|
9594
9594
|
mixins: [mixin$1, locale.mixin],
|
|
9595
|
+
props: {
|
|
9596
|
+
realPickerType: {
|
|
9597
|
+
type: String,
|
|
9598
|
+
default: ''
|
|
9599
|
+
}
|
|
9600
|
+
},
|
|
9595
9601
|
data: function data() {
|
|
9596
9602
|
return {};
|
|
9597
9603
|
},
|
|
@@ -9607,6 +9613,7 @@
|
|
|
9607
9613
|
return translatedDays.splice(0, 7 - 0).concat(translatedDays.splice(0, 0));
|
|
9608
9614
|
},
|
|
9609
9615
|
cells: function cells() {
|
|
9616
|
+
var _this = this;
|
|
9610
9617
|
var tableYear = this.tableDate.getFullYear();
|
|
9611
9618
|
var tableMonth = this.tableDate.getMonth();
|
|
9612
9619
|
var today = clearHours(new Date());
|
|
@@ -9631,7 +9638,8 @@
|
|
|
9631
9638
|
disabled: cell.date && disabledTestFn && disabledTestFn(new Date(time)),
|
|
9632
9639
|
range: dateIsInCurrentMonth && isRange && isInRange(time, rangeStart, rangeEnd),
|
|
9633
9640
|
start: dateIsInCurrentMonth && isRange && time === minDay,
|
|
9634
|
-
end: dateIsInCurrentMonth && isRange && time === maxDay
|
|
9641
|
+
end: dateIsInCurrentMonth && isRange && time === maxDay,
|
|
9642
|
+
pickerType: _this.realPickerType
|
|
9635
9643
|
});
|
|
9636
9644
|
}).cells.slice(0);
|
|
9637
9645
|
}
|
|
@@ -9704,6 +9712,12 @@
|
|
|
9704
9712
|
|
|
9705
9713
|
var script$m = {
|
|
9706
9714
|
mixins: [mixin$1],
|
|
9715
|
+
props: {
|
|
9716
|
+
realPickerType: {
|
|
9717
|
+
type: String,
|
|
9718
|
+
default: ''
|
|
9719
|
+
}
|
|
9720
|
+
},
|
|
9707
9721
|
computed: {
|
|
9708
9722
|
startYear: function startYear() {
|
|
9709
9723
|
return Math.floor(this.tableDate.getFullYear() / 10) * 10;
|
|
@@ -9726,6 +9740,7 @@
|
|
|
9726
9740
|
var day = clearHours(cell.date);
|
|
9727
9741
|
cell.selected = selectedDays.includes(day);
|
|
9728
9742
|
cell.focused = day === focusedDate;
|
|
9743
|
+
cell.pickerType = this.realPickerType;
|
|
9729
9744
|
cells.push(cell);
|
|
9730
9745
|
}
|
|
9731
9746
|
return cells;
|
|
@@ -9796,6 +9811,12 @@
|
|
|
9796
9811
|
|
|
9797
9812
|
var script$n = {
|
|
9798
9813
|
mixins: [mixin$1],
|
|
9814
|
+
props: {
|
|
9815
|
+
realPickerType: {
|
|
9816
|
+
type: String,
|
|
9817
|
+
default: ''
|
|
9818
|
+
}
|
|
9819
|
+
},
|
|
9799
9820
|
computed: {
|
|
9800
9821
|
cells: function cells() {
|
|
9801
9822
|
var cells = [];
|
|
@@ -9817,6 +9838,7 @@
|
|
|
9817
9838
|
cell.disabled = typeof this.disabledDate === 'function' && this.disabledDate(cell.date) && this.selectionMode === 'month';
|
|
9818
9839
|
cell.selected = selectedDays.includes(day);
|
|
9819
9840
|
cell.focused = day === focusedDate;
|
|
9841
|
+
cell.pickerType = this.realPickerType;
|
|
9820
9842
|
cells.push(cell);
|
|
9821
9843
|
}
|
|
9822
9844
|
return cells;
|
|
@@ -11047,7 +11069,8 @@
|
|
|
11047
11069
|
currentView: selectionMode || 'date',
|
|
11048
11070
|
pickerTable: this.getTableType(selectionMode),
|
|
11049
11071
|
dates: dates,
|
|
11050
|
-
panelDate: this.startDate || dates[0] || new Date()
|
|
11072
|
+
panelDate: this.startDate || dates[0] || new Date(),
|
|
11073
|
+
realPickerType: this.getRealPickerType(selectionMode)
|
|
11051
11074
|
};
|
|
11052
11075
|
},
|
|
11053
11076
|
computed: {
|
|
@@ -11065,6 +11088,7 @@
|
|
|
11065
11088
|
var handler = function handler(type) {
|
|
11066
11089
|
return function () {
|
|
11067
11090
|
_this.pickerTable = _this.getTableType(type);
|
|
11091
|
+
_this.realPickerType = _this.getRealPickerType(type);
|
|
11068
11092
|
};
|
|
11069
11093
|
};
|
|
11070
11094
|
return {
|
|
@@ -11098,6 +11122,7 @@
|
|
|
11098
11122
|
selectionMode: function selectionMode(type) {
|
|
11099
11123
|
this.currentView = type;
|
|
11100
11124
|
this.pickerTable = this.getTableType(type);
|
|
11125
|
+
this.realPickerType = this.getRealPickerType(type);
|
|
11101
11126
|
},
|
|
11102
11127
|
focusedDate: function focusedDate(date) {
|
|
11103
11128
|
var isDifferentYear = date.getFullYear() !== this.panelDate.getFullYear();
|
|
@@ -11113,6 +11138,7 @@
|
|
|
11113
11138
|
reset: function reset() {
|
|
11114
11139
|
this.currentView = this.selectionMode;
|
|
11115
11140
|
this.pickerTable = this.getTableType(this.currentView);
|
|
11141
|
+
this.realPickerType = this.getRealPickerType(this.currentView);
|
|
11116
11142
|
},
|
|
11117
11143
|
changeYear: function changeYear(dir) {
|
|
11118
11144
|
if (this.selectionMode === 'year' || this.pickerTable === 'year-table') {
|
|
@@ -11124,6 +11150,9 @@
|
|
|
11124
11150
|
getTableType: function getTableType(currentView) {
|
|
11125
11151
|
return currentView.match(/^time/) ? 'time-picker' : "".concat(currentView, "-table");
|
|
11126
11152
|
},
|
|
11153
|
+
getRealPickerType: function getRealPickerType(currentView) {
|
|
11154
|
+
return currentView.match(/^time/) ? 'time-picker' : "".concat(currentView);
|
|
11155
|
+
},
|
|
11127
11156
|
changeMonth: function changeMonth(dir) {
|
|
11128
11157
|
this.panelDate = siblingMonth(this.panelDate, dir);
|
|
11129
11158
|
},
|
|
@@ -11131,8 +11160,10 @@
|
|
|
11131
11160
|
this.panelDate = value;
|
|
11132
11161
|
if (this.pickerTable === 'year-table') {
|
|
11133
11162
|
this.pickerTable = 'month-table';
|
|
11163
|
+
this.realPickerType = 'month';
|
|
11134
11164
|
} else {
|
|
11135
11165
|
this.pickerTable = this.getTableType(this.currentView);
|
|
11166
|
+
this.realPickerType = this.getRealPickerType(this.currentView);
|
|
11136
11167
|
}
|
|
11137
11168
|
},
|
|
11138
11169
|
handlePick: function handlePick(value, type) {
|
|
@@ -11254,7 +11285,8 @@
|
|
|
11254
11285
|
"selection-mode": _vm.selectionMode,
|
|
11255
11286
|
"disabled-date": _vm.disabledDate,
|
|
11256
11287
|
"focused-date": _vm.focusedDate,
|
|
11257
|
-
"cell-class": _vm.cellClass
|
|
11288
|
+
"cell-class": _vm.cellClass,
|
|
11289
|
+
"real-picker-type": _vm.realPickerType
|
|
11258
11290
|
},
|
|
11259
11291
|
on: {
|
|
11260
11292
|
"pick": _vm.panelPickerHandlers,
|