| | |
| | | } else if (type === 'fileupload') { |
| | | _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength'] |
| | | } else if (type === 'textarea') { |
| | | _options = [..._options, 'fieldlength'] |
| | | _options = [..._options, 'fieldlength', 'maxRows'] |
| | | } else if (type === 'text') { |
| | | _options = [..._options, 'fieldlength', 'regular'] |
| | | } |
| | |
| | | } else if (value === 'fileupload') { |
| | | _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength'] |
| | | } else if (value === 'textarea') { |
| | | _options = [..._options, 'fieldlength'] |
| | | _options = [..._options, 'fieldlength', 'maxRows'] |
| | | } else if (value === 'text') { |
| | | _options = [..._options, 'fieldlength', 'regular'] |
| | | } |
| | |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={0} max={18} precision={0} onPressEnter={this.handleSubmit} />)} |
| | | })(<InputNumber min={0} max={18} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={1} precision={0} onPressEnter={this.handleSubmit} />)} |
| | | })(<InputNumber min={1} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | | } else if (item.key === 'maxRows') { |
| | | fields.push( |
| | | <Col span={12} key={index}> |
| | | <Form.Item label={item.label}> |
| | | {getFieldDecorator(item.key, { |
| | | initialValue: item.initVal, |
| | | rules: [ |
| | | { |
| | | required: !!item.required, |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber min={2} max={100} precision={0} />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |
| | |
| | | message: this.props.dict['form.required.input'] + item.label + '!' |
| | | } |
| | | ] |
| | | })(<InputNumber onPressEnter={this.handleSubmit} />)} |
| | | })(<InputNumber />)} |
| | | </Form.Item> |
| | | </Col> |
| | | ) |