From 06404e701a89955958cbf56213e2eec618d8644d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 16 十二月 2020 18:36:16 +0800
Subject: [PATCH] 2020-12-16

---
 src/tabviews/custom/components/card/data-card/index.jsx |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index b46423b..373bcd7 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -313,9 +313,10 @@
   render() {
     const { config, loading, data, pageIndex, total, card, activeKey, BID, BData, selectedData, selectKeys } = this.state
 
-    let _total = config.setting.pageSize * pageIndex
+    let _total = 0
     let switchable = false
     if (config.wrap.pagestyle === 'switch' && config.pageable && config.setting.laypage && total > config.setting.pageSize && data) {
+      _total = config.setting.pageSize * pageIndex
       switchable = true
     }
 
@@ -351,7 +352,7 @@
           {switchable ? <div className={'prev-page ' + (total <= _total ? 'disabled' : '')} onClick={this.nextPage}><div><div><img src={nextImg} alt=""/></div></div></div> : null}
           {data && data.length === 0 ? <Empty description={false}/> : null}
         </div>
-        {config.wrap.pagestyle !== 'switch' && config.setting.laypage && data ? <Pagination total={total} showTotal={t => `鍏� ${t} 鏉} pageSize={config.setting.pageSize} onChange={this.changePageIndex} current={pageIndex}/> : null}
+        {config.wrap.pagestyle !== 'switch' && config.setting.laypage && data ? <Pagination size="small" total={total} showTotal={t => `鍏� ${t} 鏉} pageSize={config.setting.pageSize} onChange={this.changePageIndex} current={pageIndex}/> : null}
       </div>
     )
   }

--
Gitblit v1.8.0