From 73597a19e5a8c6251889db6b55fe651516897b61 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Wed, 7 Mar 2018 10:48:33 +0800 Subject: [PATCH] fix pagination --- components/pagination/Pagination.vue | 6 ------ components/vc-pagination/Options.vue | 2 +- components/vc-pagination/Pager.vue | 5 +---- components/vc-pagination/Pagination.vue | 8 ++++---- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/components/pagination/Pagination.vue b/components/pagination/Pagination.vue index ca5691f88..b2e95f583 100644 --- a/components/pagination/Pagination.vue +++ b/components/pagination/Pagination.vue @@ -40,12 +40,6 @@ export default { model: { prop: 'current', }, - data () { - const { current } = this - return { - stateCurrent: +current, - } - }, methods: { renderPagination (locale) { const { buildOptionText, size, ...restProps } = getOptionProps(this) diff --git a/components/vc-pagination/Options.vue b/components/vc-pagination/Options.vue index b1f735432..11cbb2484 100644 --- a/components/vc-pagination/Options.vue +++ b/components/vc-pagination/Options.vue @@ -101,7 +101,7 @@ export default { gotoButton = ( {goButton} ) } diff --git a/components/vc-pagination/Pager.vue b/components/vc-pagination/Pager.vue index 24813e270..81bbfd0b6 100644 --- a/components/vc-pagination/Pager.vue +++ b/components/vc-pagination/Pager.vue @@ -22,9 +22,6 @@ export default { if (this.active) { cls = `${cls} ${prefixCls}-active` } - if (this.className) { - cls = `${cls} ${this.className}` - } return cls }, }, @@ -33,7 +30,7 @@ export default { this.$emit('click', this.page) }, handleKeyPress (event) { - this.$emit('keyPress', event, this.handleClick, this.page) + this.$emit('keypress', event, this.handleClick, this.page) }, }, render () { diff --git a/components/vc-pagination/Pagination.vue b/components/vc-pagination/Pagination.vue index 796d629a0..9e37ec597 100644 --- a/components/vc-pagination/Pagination.vue +++ b/components/vc-pagination/Pagination.vue @@ -84,7 +84,7 @@ export default { let current = this.current const newCurrent = this.calculatePage(val) current = current > newCurrent ? newCurrent : current - if (hasProp(this, 'current')) { + if (!hasProp(this, 'current')) { newState.stateCurrent = current newState.stateCurrentInputValue = current } @@ -188,7 +188,7 @@ export default { stateCurrentInputValue: page, }) } - this.$emit('input', page) + // this.$emit('input', page) this.$emit('change', page, this.statePageSize) return page } @@ -254,7 +254,7 @@ export default { @@ -263,7 +263,7 @@ export default { gotoButton = ( {goButton} ) }