| | |
| | | } |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.label}> |
| | | <Form.Item label={item.tooltip ? |
| | | <Tooltip placement="topLeft" title={item.tooltip}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | {item.label} |
| | | </Tooltip> : item.label |
| | | }> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [ |
| | |
| | | type: 'file', |
| | | key: 'url', |
| | | label: '图片/文件', |
| | | tooltip: '使用静态图片时,@icon@代表头像。', |
| | | initVal: card.url || '', |
| | | maxfile: 1, |
| | | required: true |
| | |
| | | } else if (item.key === 'output') { |
| | | if (interType === 'system') { |
| | | _rules = [{ |
| | | pattern: /^@[0-9a-zA-Z_]*$/, |
| | | pattern: /^@[0-9a-zA-Z_]+@?$/, |
| | | message: '变量以@符开头,可使用字母、数字以及_' |
| | | }, { |
| | | max: 100, |
| | |
| | | } else if (item.key === 'output') { |
| | | if (this.record.intertype === 'system') { |
| | | rules = [{ |
| | | pattern: /^@[0-9a-zA-Z_]*$/, |
| | | pattern: /^@[0-9a-zA-Z_]+@?$/, |
| | | message: '变量以@符开头,可使用字母、数字以及_' |
| | | }, { |
| | | max: 100, |
| | |
| | | } else if (item.key === 'output') { |
| | | if (this.record.intertype === 'system') { |
| | | rules = [{ |
| | | pattern: /^@[0-9a-zA-Z_]*$/, |
| | | pattern: /^@[0-9a-zA-Z_]+@?$/, |
| | | message: '变量以@符开头,可使用字母、数字以及_' |
| | | }, { |
| | | max: 100, |