From 6d61c46fd0a9a2e967a604519d9a6361694280dc Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 01 四月 2021 17:09:16 +0800 Subject: [PATCH] 2021-04-01 --- src/templates/modalconfig/dragelement/card.jsx | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/templates/modalconfig/dragelement/card.jsx b/src/templates/modalconfig/dragelement/card.jsx index f1eb64d..3ea4921 100644 --- a/src/templates/modalconfig/dragelement/card.jsx +++ b/src/templates/modalconfig/dragelement/card.jsx @@ -110,11 +110,19 @@ <Checkbox value="D">D</Checkbox> </Checkbox.Group>) } else if (card.type === 'hint') { - formItem = <div style={{marginTop: '10px', color: 'rgba(0, 0, 0, 0.85)'}}>{card.message}</div> + formItem = <div style={{marginTop: '10px', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '1.5'}}>{card.message}</div> } else if (card.type === 'split') { formItem = <div className="split-line">{card.label}</div> } else if (card.type === 'checkcard') { formItem = <CheckCard width={card.width} ratio={card.ratio} display={card.display} fields={card.fields} options={card.options} /> + } + + let _label = card.label + if (card.tooltip) { + _label = <span><Icon type="question-circle" />{card.label}</span> + } + if (card.type === 'brafteditor' && card.hidelabel === 'true') { + _label = null } return ( @@ -129,8 +137,8 @@ <div ref={node => drag(drop(node))}> {card.type === 'split' ? formItem : <Form.Item className="ant-form-item" - colon={!!card.label} - label={card.tooltip ? <span><Icon type="question-circle" />{card.label}</span> : card.label} + colon={!!_label} + label={_label} required={card.required === 'true'} extra={card.extra || null} labelCol={card.labelwidth ? {style: {width: card.labelwidth + '%'}} : null} -- Gitblit v1.8.0