From 145a6eb83133497b3863add21610ac6015e6533e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 13 五月 2021 18:33:34 +0800
Subject: [PATCH] 2021-05-13

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

diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx
index d29d195..2bd98ab 100644
--- a/src/menu/components/card/data-card/index.jsx
+++ b/src/menu/components/card/data-card/index.jsx
@@ -34,13 +34,13 @@
   state = {
     dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     card: null,
-    ismob: sessionStorage.getItem('appType') === 'mob',
+    appType: sessionStorage.getItem('appType'),
     back: false
   }
 
   UNSAFE_componentWillMount () {
     const { card } = this.props
-    const { ismob } = this.state
+    const { appType } = this.state
 
     if (card.isNew) {
       let _card = {
@@ -67,7 +67,7 @@
         btnlog: [],
         subcards: [{
           uuid: Utils.getuuid(),
-          setting: { width: ismob ? 24 : 6, type: 'simple'},
+          setting: { width: appType === 'mob' ? 24 : 6, type: 'simple'},
           style: {
             borderWidth: '1px', borderColor: '#e8e8e8',
             paddingTop: '15px', paddingBottom: '15px', paddingLeft: '15px', paddingRight: '15px',
@@ -383,7 +383,7 @@
   }
 
   render() {
-    const { card, ismob } = this.state
+    const { card, appType } = this.state
 
     let offset = 0
     if (card.wrap.cardFloat && card.wrap.cardFloat !== 'left') {
@@ -403,7 +403,7 @@
         <NormalHeader defaultshow="hidden" config={card} updateComponent={this.updateComponent}/>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            {!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}
             <Icon className="plus" title="娣诲姞鎸夐挳" onClick={this.addButton} type="plus-square" />
             <WrapComponent config={card} updateConfig={this.updateComponent} />
             <CopyComponent type="datacard" card={card}/>
@@ -420,7 +420,7 @@
         <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
         {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} offset={!index ? offset : 0} cards={card} card={subcard} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
         <div style={{clear: 'both'}}></div>
-        {card.wrap.pagestyle !== 'switch' && card.setting.laypage === 'true' ? <Pagination total={85} size="small" showTotal={total => `鍏� ${total} 鏉} pageSize={20} defaultCurrent={1}/> : null}
+        {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' ? <Pagination total={85} size="small" showTotal={total => `鍏� ${total} 鏉} pageSize={20} defaultCurrent={1}/> : null}
       </div>
     )
   }

--
Gitblit v1.8.0