From bde2916433c7830e2879e6524e32b9f6c8bd0bab Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 02 一月 2022 16:31:32 +0800
Subject: [PATCH] 2022-01-02

---
 src/tabviews/custom/components/card/prop-card/index.jsx |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index 8be4cc6..a347b8e 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -109,9 +109,13 @@
       _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'
-    let selected = _config.wrap.selected || 'false'
+    _config.wrap.scale = _config.wrap.scale === 'true' ? 'scale' : ''
+
+    _config.wrap.wrapClass =  `${_config.wrap.selStyle} ${_config.wrap.cardType || ''} ${_config.wrap.scale || ''}`
 
     this.setState({
       selected,
@@ -405,12 +409,19 @@
           </div> : null
         }
         <NormalHeader config={config}/>
-        <Row className={`card-row-list ${config.wrap.cardType || ''} ${config.wrap.scale || ''}`}>
-          {config.subcards.map((item, index) => (
-            <Col className={(activeKey === index ? config.wrap.selStyle : '') + (item.setting.click ? ' pointer' : '')} key={index} span={item.setting.width || 6} offset={item.offset || 0} onClick={() => {this.changeCard(index, item)}}>
-              <CardItem card={item} cards={config} data={data}/>
-            </Col>
-          ))}
+        <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) {
+              className += 'active'
+            }
+
+            return (
+              <Col className={className} key={index} span={item.setting.width || 6} offset={item.offset || 0} onClick={() => {this.changeCard(index, item)}}>
+                <CardItem card={item} cards={config} data={data}/>
+              </Col>
+            )
+          })}
         </Row>
       </div>
     )

--
Gitblit v1.8.0