From f2b6db6afa76ff6fe1b13c605c89e0b201a79177 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 20 六月 2023 15:42:09 +0800 Subject: [PATCH] 2023-06-20 --- src/tabviews/custom/components/card/cardcellList/index.jsx | 32 +++++++++++++++++++++++--------- 1 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 16a16f4..f87948f 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -524,6 +524,8 @@ if (card.datatype === 'dynamic') { icon = data[card.field] || '' + } else if (card.tipType === 'text') { + icon = card.value } else { icon = card.icon } @@ -537,16 +539,28 @@ } else { val = card.tooltip } - - contents.push( - <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> - <div style={card.style}> - {val ? <Tooltip title={val}> - <MkIcon className="ant-mk-icon" style={{height: card.innerHeight}} type={icon}/> - </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: card.innerHeight}} type={icon}/>} + + if (card.tipType === 'text') { + contents.push( + <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> + <div style={card.style}> + {val ? <Tooltip title={val}> + <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}}>{icon}</div> + </Tooltip> : <div className={'ant-mk-text line' + (card.height || '')} style={{height: card.innerHeight}}>{icon}</div>} + </div> </div> - </div> - ) + ) + } else { + contents.push( + <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}> + <div style={card.style}> + {val ? <Tooltip title={val}> + <MkIcon className="ant-mk-icon" style={{height: card.innerHeight}} type={icon}/> + </Tooltip> : <MkIcon className="ant-mk-icon" style={{height: card.innerHeight}} type={icon}/>} + </div> + </div> + ) + } } else if (card.eleType === 'slider') { let val = 0 let color = card.color -- Gitblit v1.8.0