From 0594fe8d97286a535177f8ba05972d0305fc7dee Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 17 二月 2020 14:15:58 +0800 Subject: [PATCH] 2020-02-17 --- src/templates/tableshare/dragelement/card.jsx | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/templates/tableshare/dragelement/card.jsx b/src/templates/tableshare/dragelement/card.jsx index cb6963f..8e70cdc 100644 --- a/src/templates/tableshare/dragelement/card.jsx +++ b/src/templates/tableshare/dragelement/card.jsx @@ -75,6 +75,15 @@ } } + let hasProfile = false + if (type === 'action') { + if (['pop', 'prompt', 'exec'].includes(card.OpenType) && card.intertype === 'inner' && !card.innerFunc) { + hasProfile = true + } else if (card.OpenType === 'excelIn') { + hasProfile = true + } + } + return ( <div className="page-card" style={type === 'columns' ? { flex: card.Width, opacity: opacity} : { opacity: opacity}}> <div ref={node => drag(drop(node))}> @@ -134,12 +143,6 @@ {showfield ? <div className="ant-table-column-fields"> <span className="ant-table-column-title">{card.type === 'colspan' ? card.subfield : card.field}</span> - {/* <span className="ant-table-column-title"> - {card.type === 'colspan' ? - <Paragraph copyable>{card.subfield}</Paragraph> : - <Paragraph copyable>{card.field}</Paragraph> - } - </span> */} </div> : null } </span> : null @@ -148,9 +151,7 @@ <Icon className="edit" title="缂栬緫" type="edit" onClick={edit} /> <Icon className="edit close" title="鍒犻櫎" type="close" onClick={del} /> {type === 'action' ? <Icon className="edit copy" title="澶嶅埗" type="copy" onClick={copy} /> : null} - {type === 'action' && ['pop', 'prompt', 'exec', 'excelIn'].includes(card.OpenType) && card.intertype === 'inner' && !card.innerFunc ? - <Icon className="edit profile" title="鏍¢獙瑙勫垯" type="profile" onClick={profile} /> : null - } + {hasProfile ? <Icon className="edit profile" title="鏍¢獙瑙勫垯" type="profile" onClick={profile} /> : null} </div> ) } -- Gitblit v1.8.0