mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-16 11:44:01 +08:00
Pagination: add keyup event to jumper so it works in IE11 (#9538)
This commit is contained in:
@@ -214,6 +214,11 @@ export default {
|
||||
this.resetValueIfNeed(target.value);
|
||||
this.reassignMaxValue(target.value);
|
||||
},
|
||||
handleKeyup({ keyCode, target }) {
|
||||
if (keyCode === 13 && this.oldValue && target.value !== this.oldValue) {
|
||||
this.handleChange(target.value);
|
||||
}
|
||||
},
|
||||
handleChange(value) {
|
||||
this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(value);
|
||||
this.oldValue = null;
|
||||
@@ -248,6 +253,7 @@ export default {
|
||||
domPropsValue={ this.$parent.internalCurrentPage }
|
||||
type="number"
|
||||
ref="input"
|
||||
nativeOnKeyup={ this.handleKeyup }
|
||||
onChange={ this.handleChange }
|
||||
onFocus={ this.handleFocus }
|
||||
onBlur={ this.handleBlur }/>
|
||||
|
||||
Reference in New Issue
Block a user