From 73aa58ad785c9632ade8356ebf0ab42c7e05fd99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Fri, 22 Jun 2018 02:44:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dattr=E6=8C=87=E4=BB=A4?= =?UTF-8?q?=E8=AF=AD=E6=B3=95=E7=9A=84bug;=E4=BC=98=E5=8C=96=E4=B8=BB?= =?UTF-8?q?=E9=A2=982=E7=9A=84=E6=A0=B7=E5=BC=8F;=E6=80=BB=E9=A1=B5?= =?UTF-8?q?=E6=95=B0=E7=AD=89=E4=BA=8E1=E6=97=B6,=E4=BB=8D=E7=84=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=A1=B5=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/pager/index.js | 11 ++++++----- src/js/pager/main.scss | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/js/pager/index.js b/src/js/pager/index.js index cd96f80..c1d119a 100644 --- a/src/js/pager/index.js +++ b/src/js/pager/index.js @@ -13,6 +13,7 @@ function calculate({ currPage, maxPageShow, totalPage }) { : Math.floor(maxPageShow / 2) if (totalPage < 2) { + arr.push(1) return arr } if (currPage - halfPage > 1) { @@ -56,28 +57,28 @@ function update(currPage, vm) { const tmpls = { home: ``, end: ``, prev: ``, next: ``, pager: `