| | |
| | | |
| | | getFields() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const { interType } = this.state |
| | | const fields = [] |
| | | |
| | | this.state.formlist.forEach((item, index) => { |
| | |
| | | max: formRule.func.max, |
| | | message: formRule.func.maxMessage |
| | | }] |
| | | } else if (item.key === 'output') { |
| | | if (interType === 'system') { |
| | | _rules = [{ |
| | | pattern: /^@[0-9a-zA-Z_]*$/, |
| | | message: '变量以@符开头,可使用字母、数字以及_' |
| | | }, { |
| | | max: 100, |
| | | message: '最多100个字符。' |
| | | }] |
| | | } else { |
| | | _rules = [{ |
| | | pattern: /^[0-9a-zA-Z_]*$/, |
| | | message: '字段可使用字母、数字以及_' |
| | | }, { |
| | | max: 100, |
| | | message: '最多100个字符。' |
| | | }] |
| | | } |
| | | } else { |
| | | _rules = [{ |
| | | max: formRule.input.max, |