From 1e998db7fffd7dd0a23ab49f1f734d46571a90f8 Mon Sep 17 00:00:00 2001 From: reco_luan <1156743527@qq.com> Date: Thu, 24 Jan 2019 15:11:55 +0800 Subject: [PATCH] Update index.vue --- components/Pagation/index.vue | 40 ++++++++++++----------------------- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/components/Pagation/index.vue b/components/Pagation/index.vue index 9b3a50e..4f8d3c0 100644 --- a/components/Pagation/index.vue +++ b/components/Pagation/index.vue @@ -1,17 +1,17 @@ @@ -78,27 +78,15 @@ export default { }, methods: { goPrev () { - alert(this.currentPage) + let currentPage = this.currentPage if (this.currentPage > 1) { - let currentPage = this.currentPage; - --currentPage; - - alert(currentPage) - this.emit(currentPage); - - return; + this.emit(--currentPage) } }, goNext () { - alert(this.currentPage) - alert(this.pages) - if (this.currentPage < this.pages) { - let currentPage = this.currentPage; - ++currentPage; - alert(currentPage) - this.emit(currentPage); - - return; + let currentPage = this.currentPage + if (currentPage < this.pages) { + this.emit(++currentPage) } }, jumpPage: function(id) { @@ -168,4 +156,4 @@ export default { padding: 0px 8px; &.jumppoint margin-left: 30px; - \ No newline at end of file +