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')"
|
@input.native="handleDateInput($event, 'min')"
|
||||||
@change.native="handleDateChange($event, 'min')" />
|
@change.native="handleDateChange($event, 'min')" />
|
||||||
</span>
|
</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
|
<el-input
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="rangeState.selecting"
|
:disabled="rangeState.selecting"
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
@input.native="handleDateInput($event, 'max')"
|
@input.native="handleDateInput($event, 'max')"
|
||||||
@change.native="handleDateChange($event, 'max')" />
|
@change.native="handleDateChange($event, 'max')" />
|
||||||
</span>
|
</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
|
<el-input
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="rangeState.selecting"
|
:disabled="rangeState.selecting"
|
||||||
|
@ -539,6 +539,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleMinTimeClose() {
|
||||||
|
this.minTimePickerVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
handleMaxTimePick(value, visible, first) {
|
handleMaxTimePick(value, visible, first) {
|
||||||
if (this.maxDate && value) {
|
if (this.maxDate && value) {
|
||||||
this.maxDate = modifyTime(this.maxDate, value.getHours(), value.getMinutes(), value.getSeconds());
|
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`
|
// leftPrev*, rightNext* need to take care of `unlinkPanels`
|
||||||
leftPrevYear() {
|
leftPrevYear() {
|
||||||
this.leftDate = prevYear(this.leftDate);
|
this.leftDate = prevYear(this.leftDate);
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
@input="val => userInputDate = val"
|
@input="val => userInputDate = val"
|
||||||
@change="handleVisibleDateChange" />
|
@change="handleVisibleDateChange" />
|
||||||
</span>
|
</span>
|
||||||
<span class="el-date-picker__editor-wrap" v-clickoutside="() => timePickerVisible = false">
|
<span class="el-date-picker__editor-wrap" v-clickoutside="handleTimePickClose">
|
||||||
<el-input
|
<el-input
|
||||||
ref="input"
|
ref="input"
|
||||||
@focus="timePickerVisible = true"
|
@focus="timePickerVisible = true"
|
||||||
|
@ -317,6 +317,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
handleTimePickClose() {
|
||||||
|
this.timePickerVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
handleMonthPick(month) {
|
handleMonthPick(month) {
|
||||||
if (this.selectionMode === 'month') {
|
if (this.selectionMode === 'month') {
|
||||||
this.date = modifyDate(this.date, this.year, month, 1);
|
this.date = modifyDate(this.date, this.year, month, 1);
|
||||||
|
|
Loading…
Reference in New Issue