mirror of https://github.com/ElemeFE/element
Use methods instead of inline expressions (#12059)
parent
eaebce5929
commit
e003b1460a
|
@ -31,7 +31,7 @@
|
|||
@input.native="handleDateInput($event, 'min')"
|
||||
@change.native="handleDateChange($event, 'min')" />
|
||||
</span>
|
||||
<span class="el-date-range-picker__time-picker-wrap" v-clickoutside="() => minTimePickerVisible = false">
|
||||
<span class="el-date-range-picker__time-picker-wrap" v-clickoutside="handleMinTimeClose">
|
||||
<el-input
|
||||
size="small"
|
||||
:disabled="rangeState.selecting"
|
||||
|
@ -62,7 +62,7 @@
|
|||
@input.native="handleDateInput($event, 'max')"
|
||||
@change.native="handleDateChange($event, 'max')" />
|
||||
</span>
|
||||
<span class="el-date-range-picker__time-picker-wrap" v-clickoutside="() => maxTimePickerVisible = false">
|
||||
<span class="el-date-range-picker__time-picker-wrap" v-clickoutside="handleMaxTimeClose">
|
||||
<el-input
|
||||
size="small"
|
||||
:disabled="rangeState.selecting"
|
||||
|
@ -539,6 +539,10 @@
|
|||
}
|
||||
},
|
||||
|
||||
handleMinTimeClose() {
|
||||
this.minTimePickerVisible = false;
|
||||
},
|
||||
|
||||
handleMaxTimePick(value, visible, first) {
|
||||
if (this.maxDate && value) {
|
||||
this.maxDate = modifyTime(this.maxDate, value.getHours(), value.getMinutes(), value.getSeconds());
|
||||
|
@ -553,6 +557,10 @@
|
|||
}
|
||||
},
|
||||
|
||||
handleMaxTimeClose() {
|
||||
this.maxTimePickerVisible = false;
|
||||
},
|
||||
|
||||
// leftPrev*, rightNext* need to take care of `unlinkPanels`
|
||||
leftPrevYear() {
|
||||
this.leftDate = prevYear(this.leftDate);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
@input="val => userInputDate = val"
|
||||
@change="handleVisibleDateChange" />
|
||||
</span>
|
||||
<span class="el-date-picker__editor-wrap" v-clickoutside="() => timePickerVisible = false">
|
||||
<span class="el-date-picker__editor-wrap" v-clickoutside="handleTimePickClose">
|
||||
<el-input
|
||||
ref="input"
|
||||
@focus="timePickerVisible = true"
|
||||
|
@ -317,6 +317,10 @@
|
|||
}
|
||||
},
|
||||
|
||||
handleTimePickClose() {
|
||||
this.timePickerVisible = false;
|
||||
},
|
||||
|
||||
handleMonthPick(month) {
|
||||
if (this.selectionMode === 'month') {
|
||||
this.date = modifyDate(this.date, this.year, month, 1);
|
||||
|
|
Loading…
Reference in New Issue