chore: prettier js codes
This commit is contained in:
@@ -44,15 +44,21 @@ export default createComponent({
|
||||
|
||||
computed: {
|
||||
ranges() {
|
||||
const { maxYear, maxDate, maxMonth, maxHour, maxMinute } = this.getBoundary(
|
||||
'max',
|
||||
this.innerValue
|
||||
);
|
||||
const {
|
||||
maxYear,
|
||||
maxDate,
|
||||
maxMonth,
|
||||
maxHour,
|
||||
maxMinute,
|
||||
} = this.getBoundary('max', this.innerValue);
|
||||
|
||||
const { minYear, minDate, minMonth, minHour, minMinute } = this.getBoundary(
|
||||
'min',
|
||||
this.innerValue
|
||||
);
|
||||
const {
|
||||
minYear,
|
||||
minDate,
|
||||
minMonth,
|
||||
minHour,
|
||||
minMinute,
|
||||
} = this.getBoundary('min', this.innerValue);
|
||||
|
||||
const result = [
|
||||
{
|
||||
@@ -134,7 +140,11 @@ export default createComponent({
|
||||
|
||||
updateInnerValue() {
|
||||
const indexes = this.getPicker().getIndexes();
|
||||
const getValue = index => getTrueValue(this.originColumns[index].values[indexes[index]]);
|
||||
|
||||
const getValue = index => {
|
||||
const { values } = this.originColumns[index];
|
||||
return getTrueValue(values[indexes[index]]);
|
||||
};
|
||||
|
||||
const year = getValue(0);
|
||||
const month = getValue(1);
|
||||
|
||||
@@ -75,11 +75,12 @@ export default createComponent({
|
||||
|
||||
updateInnerValue() {
|
||||
const [hourIndex, minuteIndex] = this.getPicker().getIndexes();
|
||||
const hour = this.originColumns[0].values[hourIndex] || this.originColumns[0].values[0];
|
||||
const minute = this.originColumns[1].values[minuteIndex] || this.originColumns[1].values[0];
|
||||
const value = `${hour}:${minute}`;
|
||||
const [hourColumn, minuteColumn] = this.originColumns;
|
||||
|
||||
this.innerValue = this.formatValue(value);
|
||||
const hour = hourColumn.values[hourIndex] || hourColumn.values[0];
|
||||
const minute = minuteColumn.values[minuteIndex] || minuteColumn.values[0];
|
||||
|
||||
this.innerValue = this.formatValue(`${hour}:${minute}`);
|
||||
},
|
||||
|
||||
onChange(picker) {
|
||||
|
||||
Reference in New Issue
Block a user