| | |
| | | import React, {Component} from 'react' |
| | | import PropTypes from 'prop-types' |
| | | import { Form, Row, Col, Input, Radio, Select } from 'antd' |
| | | import { Form, Row, Col, Input, Radio, Select, Tooltip, Icon } from 'antd' |
| | | import { formRule } from '@/utils/option.js' |
| | | import './index.scss' |
| | | |
| | |
| | | )} |
| | | </Form.Item> |
| | | </Col> |
| | | {type === 'title' ? <Col span={12}> |
| | | <Form.Item label="标题"> |
| | | <Col span={12}> |
| | | <Form.Item label={ |
| | | <Tooltip placement="topLeft" title="使用搜索栏时,标题用于搜索条件隐藏时显示。"> |
| | | <Icon type="question-circle" /> |
| | | 标题 |
| | | </Tooltip> |
| | | }> |
| | | {getFieldDecorator('title', { |
| | | initialValue: config.setting.title, |
| | | rules: [ |
| | |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | </Col> |
| | | {type === 'search' ? <Col span={12}> |
| | | <Form.Item label="搜索字段"> |
| | | {getFieldDecorator('field', { |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {type === 'search' ? <Col span={12}> |
| | | <Form.Item label="匹配方式"> |
| | | {getFieldDecorator('match', { |
| | | initialValue: config.setting.match || 'like' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="like">like</Radio> |
| | | <Radio value="not like">not like</Radio> |
| | | <Radio value="=">=</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {type === 'search' ? <Col span={12}> |
| | | <Form.Item label="必填"> |
| | | {getFieldDecorator('required', { |
| | | initialValue: config.setting.required || 'false' |
| | |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {type === 'search' ? <Col span={12}> |
| | | <Form.Item label="隐藏"> |
| | | {getFieldDecorator('Hide', { |
| | | initialValue: config.setting.Hide || 'false' |
| | | })( |
| | | <Radio.Group> |
| | | <Radio value="true">是</Radio> |
| | | <Radio value="false">否</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |
| | | </Col> : null} |
| | | {type === 'search' ? <Col span={12}> |
| | | <Form.Item label="自动聚焦"> |
| | | {getFieldDecorator('focus', { |
| | | initialValue: config.setting.focus || 'true' |