mirror of https://github.com/ElemeFE/element
Pagination: add keyup event to jumper so it works in IE11 (#9538)
parent
85a3e99ceb
commit
575e2d1307
|
@ -214,6 +214,11 @@ export default {
|
||||||
this.resetValueIfNeed(target.value);
|
this.resetValueIfNeed(target.value);
|
||||||
this.reassignMaxValue(target.value);
|
this.reassignMaxValue(target.value);
|
||||||
},
|
},
|
||||||
|
handleKeyup({ keyCode, target }) {
|
||||||
|
if (keyCode === 13 && this.oldValue && target.value !== this.oldValue) {
|
||||||
|
this.handleChange(target.value);
|
||||||
|
}
|
||||||
|
},
|
||||||
handleChange(value) {
|
handleChange(value) {
|
||||||
this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(value);
|
this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(value);
|
||||||
this.oldValue = null;
|
this.oldValue = null;
|
||||||
|
@ -248,6 +253,7 @@ export default {
|
||||||
domPropsValue={ this.$parent.internalCurrentPage }
|
domPropsValue={ this.$parent.internalCurrentPage }
|
||||||
type="number"
|
type="number"
|
||||||
ref="input"
|
ref="input"
|
||||||
|
nativeOnKeyup={ this.handleKeyup }
|
||||||
onChange={ this.handleChange }
|
onChange={ this.handleChange }
|
||||||
onFocus={ this.handleFocus }
|
onFocus={ this.handleFocus }
|
||||||
onBlur={ this.handleBlur }/>
|
onBlur={ this.handleBlur }/>
|
||||||
|
|
Loading…
Reference in New Issue