king
2021-07-07 b636a3f64219455ee680bd626c65282c636cfcef
src/mob/searchconfig/settingform/index.jsx
@@ -1,6 +1,6 @@
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'
@@ -83,8 +83,13 @@
              )}
            </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: [
@@ -95,7 +100,7 @@
                ]
              })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col> : null}
          </Col>
          {type === 'search' ? <Col span={12}>
            <Form.Item label="搜索字段">
              {getFieldDecorator('field', {
@@ -131,6 +136,19 @@
            </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'
@@ -143,6 +161,18 @@
            </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'