From 176c6e1da22e96a1110fa91f8fc8eb8ad2881e08 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 08 八月 2022 18:13:37 +0800 Subject: [PATCH] 2022-08-08 --- src/components/normalform/modalform/index.jsx | 33 +++++++++++++++++++++++---------- 1 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx index 8bc59c5..ce8b71d 100644 --- a/src/components/normalform/modalform/index.jsx +++ b/src/components/normalform/modalform/index.jsx @@ -275,16 +275,29 @@ if (!content) return - fields.push( - <Col span={item.span || 12} key={index}> - <Form.Item label={label}> - {getFieldDecorator(item.field, { - initialValue: item.initval, - rules: item.rules - })(content)} - </Form.Item> - </Col> - ) + if (item.help) { + fields.push( + <Col span={item.span || 12} key={index}> + <Form.Item label={label} help={<span style={{fontSize: '12px'}}>{item.help}</span>}> + {getFieldDecorator(item.field, { + initialValue: item.initval, + rules: item.rules + })(content)} + </Form.Item> + </Col> + ) + } else { + fields.push( + <Col span={item.span || 12} key={index}> + <Form.Item label={label}> + {getFieldDecorator(item.field, { + initialValue: item.initval, + rules: item.rules + })(content)} + </Form.Item> + </Col> + ) + } }) return fields -- Gitblit v1.8.0