From 49fabbaab6ad5ab8ab6d8da3954384e0281f6134 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 05 六月 2024 23:49:17 +0800 Subject: [PATCH] 2024-06-05 --- src/tabviews/custom/components/card/double-data-card/index.jsx | 31 ++++++++++++++++--------------- 1 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/tabviews/custom/components/card/double-data-card/index.jsx b/src/tabviews/custom/components/card/double-data-card/index.jsx index 4f56e58..3e78040 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -129,6 +129,20 @@ _config.wrap.wrapClass = `${_config.wrap.selStyle} ${_config.wrap.cardType || ''}` + if (_config.wrap.zHeight || _config.wrap.minWidth) { + if (_config.wrap.zHeight) { + _config.wrap.zHeight = _config.wrap.zHeight <= 100 ? _config.wrap.zHeight + 'vh' : _config.wrap.zHeight + _config.wrap.wrapClass += ' fix-height' + } + _config.wrap.minWidth = _config.wrap.minWidth ? _config.wrap.minWidth + 'px' : '100%' + _config.wrap.zoomStyle = { + maxHeight: _config.wrap.zHeight || 'none', + '--mk-data-zoom-width': _config.wrap.minWidth + } + } else { + _config.wrap.zoomStyle = null + } + if (_config.wrap.shifting === 'true') { _config.wrap.shifting = 'shifting' } else { @@ -173,19 +187,6 @@ if (_config.wrap.maxPageSize) { pageOptions = pageOptions.filter(item => item <= _config.wrap.maxPageSize) } - } - - if (_config.wrap.zHeight) { - _config.wrap.zHeight = _config.wrap.zHeight <= 100 ? _config.wrap.zHeight + 'vh' : _config.wrap.zHeight - } - - if (_config.wrap.zHeight || _config.wrap.minWidth) { - _config.wrap.zoomStyle = { - border: `1px solid ${_config.wrap.zBColor || 'transparent'}`, - height: _config.wrap.zHeight || 'auto' - } - } else { - _config.wrap.zoomStyle = null } this.setState({ @@ -1154,8 +1155,8 @@ } {config.wrap.pickup === 'true' && this.state.data.length > 0 ? <div className="pickup-wrap"><Switch title="鏀惰捣" checkedChildren="寮�" unCheckedChildren="鍏�" checked={pickup} onChange={this.pickupChange} /></div> : null} <div className={config.wrap.zoomStyle ? 'data-zoom-box' : ''} style={config.wrap.zoomStyle}> - <div className={`data-zoom ${config.wrap.wrapClass}`} style={config.wrap.minWidth ? {minWidth: config.wrap.minWidth} : null}> - <Row className={'card-row-list '}> + <div className={`data-zoom ${config.wrap.wrapClass}`}> + <Row className="card-row-list"> {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