From 526d2be8959e6e99c1afd31cf213f0f1e7a56a8b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 26 四月 2022 15:43:58 +0800
Subject: [PATCH] 2022-04-26

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

diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx
index 4b81300..7b10cf3 100644
--- a/src/menu/components/card/data-card/index.jsx
+++ b/src/menu/components/card/data-card/index.jsx
@@ -643,17 +643,6 @@
   render() {
     const { card, appType } = this.state
 
-    let offset = 0
-    if (card.wrap.cardFloat && card.wrap.cardFloat !== 'left') {
-      let _width = 0
-      card.subcards.forEach(card => {
-        _width += card.setting.width
-      })
-      offset = _width < 24 ? 24 - _width : 0
-      if (card.wrap.cardFloat === 'center') {
-        offset = Math.floor(offset / 2)
-      }
-    }
     let _style = resetStyle(card.style)
 
     return (
@@ -679,7 +668,9 @@
           <ToolOutlined />
         </Popover>
         <ActionComponent config={card} type="datacard" setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
-        {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} offset={!index ? offset : 0} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
+        <div className={'float-' + (card.wrap.cardFloat || 'left')}>
+          {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))}
+        </div>
         <div style={{clear: 'both'}}></div>
         {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' && appType !== 'mob' ? <Pagination total={85} size="small" showTotal={total => `鍏� ${total} 鏉} pageSize={20} defaultCurrent={1}/> : null}
         {card.wrap.pagestyle === 'page' && card.setting.laypage === 'true' && appType === 'mob' ? <MobPagination /> : null}

--
Gitblit v1.8.0