From 405da9a226f2b9783d365434242a5e299cf92d68 Mon Sep 17 00:00:00 2001 From: guosd <243889783@qq.com> Date: Thu, 6 Sep 2018 14:09:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=88=86=E9=A1=B5=E5=99=A8?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=A4=A7=E4=BA=8E1=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E6=95=B0=E6=97=B6=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E4=B8=BA=E7=A9=BA=E6=97=B6=EF=BC=8C=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E5=99=A8=E5=BD=93=E5=89=8D=E9=A1=B5=E6=95=B0=E4=B8=8D?= =?UTF-8?q?=E5=8F=98=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/page.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/page/page.vue b/src/components/page/page.vue index 4031a056..27f15bfc 100644 --- a/src/components/page/page.vue +++ b/src/components/page/page.vue @@ -156,8 +156,8 @@ watch: { total (val) { let maxPage = Math.ceil(val / this.currentPageSize); - if (maxPage < this.currentPage && maxPage > 0) { - this.currentPage = maxPage; + if (maxPage < this.currentPage ) { + this.currentPage = (maxPage === 0 ? 1 : maxPage); } }, current (val) {