From 1c1a925bbd44c3dbd34f54cd548f1b128d404f84 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Wed, 12 Oct 2016 13:40:35 +0800 Subject: [PATCH] Pagination: fix input value --- packages/pagination/src/pagination.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/pagination/src/pagination.js b/packages/pagination/src/pagination.js index 9399f248f..3a70dc4ce 100644 --- a/packages/pagination/src/pagination.js +++ b/packages/pagination/src/pagination.js @@ -168,14 +168,9 @@ export default { this.oldValue = event.target.value; }, - handleChange(event) { - const target = event.target; + handleChange({ target }) { this.$parent.internalCurrentPage = this.$parent.getValidCurrentPage(target.value); - - if (target.value !== this.oldValue && Number(target.value) === this.$parent.internalCurrentPage) { - this.$parent.$emit('currentchange', this.$parent.internalCurrentPage); - } - + this.$parent.$emit('currentchange', this.$parent.internalCurrentPage); this.oldValue = null; } }, @@ -189,12 +184,11 @@ export default { type="number" min={ 1 } max={ this.pageCount } - value={ this.$parent.internalCurrentPage } + domProps-value={ this.$parent.internalCurrentPage } on-change={ this.handleChange } on-focus={ this.handleFocus } style={{ width: '30px' }} - number - lazy/> + number/> ้กต );