From 274c4c5bff973a26b6bcf9d0c6708cb0518b1b12 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 14 五月 2021 17:54:28 +0800
Subject: [PATCH] 2021-05-14

---
 src/menu/components/card/table-card/index.jsx |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/card/table-card/index.jsx b/src/menu/components/card/table-card/index.jsx
index 4d5b011..9a848be 100644
--- a/src/menu/components/card/table-card/index.jsx
+++ b/src/menu/components/card/table-card/index.jsx
@@ -15,6 +15,7 @@
 const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
 const WrapComponent = asyncIconComponent(() => import('../data-card/wrapsetting'))
 const CardComponent = asyncComponent(() => import('./cardcomponent'))
+const MobPagination = asyncIconComponent(() => import('@/menu/components/share/mobPagination'))
 const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
 const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent'))
 const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
@@ -33,7 +34,7 @@
   state = {
     dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     card: null,
-    ismob: sessionStorage.getItem('appType') === 'mob',
+    appType: sessionStorage.getItem('appType'),
     back: false
   }
 
@@ -323,7 +324,7 @@
   }
 
   render() {
-    const { card, ismob } = this.state
+    const { card, appType } = this.state
     let _style = resetStyle(card.style)
 
     return (
@@ -332,7 +333,7 @@
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
             <Icon className="plus" title="娣诲姞鍗$墖" onClick={this.addCard} type="plus" />
-            {!ismob ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null}
+            {appType !== 'mob' ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null}
             <WrapComponent config={card} updateConfig={this.updateComponent} />
             <CopyComponent type="tablecard" card={card}/>
             <PasteComponent config={card} options={['cardcell', 'search', 'form']} updateConfig={this.updateComponent} />
@@ -348,7 +349,8 @@
         <div style={{minHeight: 'calc(100% - 90px)'}}>
           {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
         </div>
-        {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' ? <Pagination size="small" total={50} /> : null}
+        {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' && appType !== 'mob' ? <Pagination size="small" total={50} /> : null}
+        {card.setting.laypage === 'true' && card.wrap.pagestyle !== 'slide' && appType === 'mob' ? <MobPagination /> : null}
       </div>
     )
   }

--
Gitblit v1.8.0