From cbeffcc0902631909c0373f274752a97ddaf2d4e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 06 八月 2022 01:41:54 +0800
Subject: [PATCH] 2022-08-06

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

diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx
index 67eea0f..67ca766 100644
--- a/src/menu/components/card/data-card/index.jsx
+++ b/src/menu/components/card/data-card/index.jsx
@@ -573,7 +573,9 @@
   }
 
   updateWrap = (res) => {
-    let _card = {...this.state.card, wrap: res}
+    const { card } = this.state
+
+    let _card = {...card, wrap: res}
 
     if (res.supNodes) {
       _card.supNodes = res.supNodes
@@ -587,11 +589,31 @@
       delete _card.supNodes
     }
 
+    
     if (res.layout === 'flex') {
       _card.wrap.pagestyle = 'page'
     }
+    
+    if (res.selStyle === 'tabs' && card.wrap.selStyle !== 'tabs') {
+      Object.keys(_card.style).forEach(key => {
+        if (/^border/.test(key)) {
+          delete _card.style[key]
+        }
+      })
+      _card.style.borderBottomColor = '#eeeeee'
+      _card.style.borderBottomWidth = '1px'
+      _card.style.paddingBottom = '0px'
 
-    this.updateComponent(_card)
+      _card.subcards.forEach(item => {
+        delete item.style.marginBottom
+      })
+      
+      this.setState({card: {..._card, subcards: []}}, () => {
+        this.updateComponent(_card)
+      })
+    } else {
+      this.updateComponent(_card)
+    }
   }
 
   pasteComponent = (res, resolve) => {
@@ -760,7 +782,7 @@
           <ToolOutlined />
         </Popover>
         <ActionComponent config={card} type="datacard" setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/>
-        <div className={'float-' + (card.wrap.cardFloat || 'left')}>
+        <div className={'float-' + (card.wrap.cardFloat || 'left') + ' select-' + card.wrap.selStyle}>
           {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>

--
Gitblit v1.8.0