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/tabviews/custom/components/card/prop-card/index.jsx |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index 5df7934..921b4a9 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -72,7 +72,6 @@
       _cols.set(item.field, item)
     })
 
-    let _width = 0
     _config.subcards.forEach(card => {
       if (card.setting.click === 'button' && !card.setting.linkbtn) {
         card.elements.forEach(ele => {
@@ -84,7 +83,6 @@
           card.setting.click = ''
         }
       }
-      _width += card.setting.width
       card.elements = card.elements.map(item => {
         if (item.eleType === 'number' && item.field && _cols.has(item.field) && typeof(item.decimal) !== 'number') {
           item.decimal = _cols.get(item.field).decimal || 0
@@ -99,23 +97,13 @@
       })
     })
 
-    let offset = 0
-    if (_config.wrap.cardFloat && _config.wrap.cardFloat !== 'left' && _width < 24) {
-      offset = 24 - _width
-      if (_config.wrap.cardFloat === 'center') {
-        offset = Math.floor(offset / 2)
-      }
-      _config.subcards[0].offset = offset
-    }
-
     let selected = _config.wrap.selected || 'false'
 
     _config.wrap.selStyle = _config.wrap.selStyle || 'active'
     _config.wrap.priKeyType = _config.wrap.priKeyType || 'static'
     _config.wrap.scale = _config.wrap.scale === 'true' ? 'scale' : ''
-    _config.wrap.layout = (_config.wrap.layout || 'grid') + '-layout'
 
-    _config.wrap.wrapClass =  `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${_config.wrap.scale || ''}`
+    _config.wrap.wrapClass =  `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${_config.wrap.scale || ''} ${_config.wrap.layout || 'grid'}-layout float-${_config.wrap.cardFloat || 'left'}`
 
     this.setState({
       selected,
@@ -419,7 +407,7 @@
           </div> : null
         }
         <NormalHeader config={config}/>
-        <Row className={`card-row-list data-zoom ${config.wrap.wrapClass} ${config.wrap.layout}`}>
+        <Row className={`card-row-list data-zoom ${config.wrap.wrapClass}`}>
           {config.subcards.map((item, index) => {
             let className = item.setting.click ? 'mk-card pointer ' : 'mk-card '
             if (activeKey === index) {

--
Gitblit v1.8.0