From a02fc6a77fa1b35c6516b2d37108d80e260c6c85 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 07 十一月 2024 22:05:08 +0800
Subject: [PATCH] 2024-11-07

---
 src/tabviews/custom/components/card/data-card/index.jsx |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/tabviews/custom/components/card/data-card/index.jsx b/src/tabviews/custom/components/card/data-card/index.jsx
index 92f4093..a8fb5a3 100644
--- a/src/tabviews/custom/components/card/data-card/index.jsx
+++ b/src/tabviews/custom/components/card/data-card/index.jsx
@@ -191,12 +191,16 @@
     }
 
     if (_config.wrap.zHeight) {
+      _config.wrap.zoomStyle = {}
       if (_config.wrap.zHeight <= 100) {
         if (_config.wrap.zHeight < 0) {
-          _config.wrap.zHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+          _config.wrap.zoomStyle.maxHeight = `calc(100vh - ${-_config.wrap.zHeight}px)`
+          _config.wrap.zoomStyle.minHeight = '100px'
         } else {
-          _config.wrap.zHeight = _config.wrap.zHeight + 'vh'
+          _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'vh'
         }
+      } else {
+        _config.wrap.zoomStyle.maxHeight = _config.wrap.zHeight + 'px'
       }
 
       if (_config.style) {
@@ -204,7 +208,7 @@
       }
       _config.wrap.layout += ' fix-height'
     } else {
-      _config.wrap.zHeight = 'none'
+      _config.wrap.zoomStyle = null
     }
 
     this.setState({
@@ -1234,7 +1238,7 @@
         {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="鏀惰捣" checkedChildren={window.GLOB.dict['open'] || '寮�'} unCheckedChildren={window.GLOB.dict['shut'] || '鍏�'} checked={pickup} onChange={this.pickupChange} /></div> : null}
         <div className={`data-zoom ${config.wrap.wrapClass}`}>
           {switchable ? <div className={'prev-page ' + (pageIndex === 1 ? 'disabled' : '')} onClick={this.prevPage}><div><div><img src={preImg} alt=""/></div></div></div> : null}
-          <Row className={'card-row-list ' + config.wrap.layout} style={{maxHeight: config.wrap.zHeight}}>
+          <Row className={'card-row-list ' + config.wrap.layout} style={config.wrap.zoomStyle}>
             {precards.map((item, index) => (
               <Col key={'pre' + index} className="extend-card" style={item.wStyle} span={item.setting.width || 6}>
                 {item.setting.cardRole === 'header' ? <TableHeader card={item} data={extendData} refresh={this.refreshByHeader}>

--
Gitblit v1.8.0