| | |
| | | |
| | | 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 |