mirror of https://github.com/ElemeFE/element
Pagination: fix input value
parent
3019e0a770
commit
1c1a925bbd
|
@ -168,14 +168,9 @@ export default {
|
||||||
this.oldValue = event.target.value;
|
this.oldValue = event.target.value;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleChange(event) {
|
handleChange({ target }) {
|
||||||
const target = event.target;
|
|
||||||
this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(target.value);
|
this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(target.value);
|
||||||
|
this.$parent.$emit('currentchange', this.$parent.internalCurrentPage);
|
||||||
if (target.value !== this.oldValue && Number(target.value) === this.$parent.internalCurrentPage) {
|
|
||||||
this.$parent.$emit('currentchange', this.$parent.internalCurrentPage);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.oldValue = null;
|
this.oldValue = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -189,12 +184,11 @@ export default {
|
||||||
type="number"
|
type="number"
|
||||||
min={ 1 }
|
min={ 1 }
|
||||||
max={ this.pageCount }
|
max={ this.pageCount }
|
||||||
value={ this.$parent.internalCurrentPage }
|
domProps-value={ this.$parent.internalCurrentPage }
|
||||||
on-change={ this.handleChange }
|
on-change={ this.handleChange }
|
||||||
on-focus={ this.handleFocus }
|
on-focus={ this.handleFocus }
|
||||||
style={{ width: '30px' }}
|
style={{ width: '30px' }}
|
||||||
number
|
number/>
|
||||||
lazy/>
|
|
||||||
页
|
页
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue