| | |
| | | ) |
| | | } else if (item.type === 'text') { |
| | | let _max = item.fieldlength || 50 |
| | | let _rules = [] |
| | | let _rules = [{ |
| | | pattern: /^[^']*$/ig, |
| | | message: formRule.input.quotemsg |
| | | }] |
| | | if (item.regular) { |
| | | if (item.regular === 'number') { |
| | | _rules = [{ |
| | |
| | | // 函数变量字段,默认不显示 |
| | | } else if (item.type === 'textarea') { |
| | | let _max = item.fieldlength || 512 |
| | | let _rules = [] |
| | | if (item.encryption !== 'true') { |
| | | _rules = [{ |
| | | pattern: /^[^']*$/ig, |
| | | message: formRule.input.quotemsg |
| | | }] |
| | | } |
| | | fields.push( |
| | | <Col span={24} key={index}> |
| | | <Form.Item label={item.tooltip ? |
| | |
| | | { |
| | | max: _max, |
| | | message: formRule.input.formMessage.replace('@max', _max) |
| | | } |
| | | }, |
| | | ..._rules |
| | | ] |
| | | })(<TextArea autoSize={{ minRows: 2, maxRows: item.maxRows || 6 }} disabled={item.readonly === 'true'} />)} |
| | | </Form.Item> |