From 7b0dbecd1d6155d26ec67be0a47a16264c738c85 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 09 五月 2023 14:48:10 +0800 Subject: [PATCH] 2023-05-09 --- src/tabviews/custom/components/card/double-data-card/index.jsx | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 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 e010304..3d10bf5 100644 --- a/src/tabviews/custom/components/card/double-data-card/index.jsx +++ b/src/tabviews/custom/components/card/double-data-card/index.jsx @@ -156,6 +156,19 @@ } } + 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({ pageSize: _config.setting.pageSize || 10, pageOptions, @@ -562,9 +575,8 @@ if (type === 'plus') { let _data = (this.state.data || []).concat(result.data || []) data = _data.map((item, index) => { - let children = [] - if (item[config.setting.subdata]) { + let children = [] let _children = item[config.setting.subdata] delete item[config.setting.subdata] @@ -581,9 +593,10 @@ children.push(cell) } }) + item.children = children + } else if (!item.children) { + item.children = [] } - - item.children = children item.key = index item.$$uuid = item[config.setting.primaryKey] || '' @@ -944,7 +957,7 @@ selectedData={selectedData} /> : null } - <div className={config.wrap.minWidth ? 'data-zoom-box' : ''}> + <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 '}> {precards.map((item, index) => ( -- Gitblit v1.8.0