| | |
| | | }) |
| | | } |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Col span={24} key={index}> |
| | | <Form.Item label={ |
| | | item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | |
| | | ) |
| | | } else if (item.type === 'number') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Col span={24} key={index}> |
| | | <Form.Item label={ |
| | | item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | |
| | | ) |
| | | } else if (item.type === 'select') { // 下拉搜索 |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Col span={24} key={index}> |
| | | <Form.Item label={item.label}> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | |
| | | ) |
| | | } else if (item.type === 'mutilselect') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Col span={24} key={index}> |
| | | <Form.Item label={ |
| | | item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | |
| | | ) |
| | | } else if (item.type === 'radio') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Col span={24} key={index}> |
| | | <Form.Item label={item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | | <Icon type="question-circle" /> |
| | |
| | | }, |
| | | wrapperCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 16 } |
| | | sm: { span: 12 } |
| | | } |
| | | } |
| | | return ( |