king
2020-03-03 e603c97dbe7a4f1dbd6445e00383ed651182e0fe
src/templates/tableshare/searchform/index.jsx
@@ -9,10 +9,11 @@
class MainSearch extends Component {
  static propTpyes = {
    dict: PropTypes.object,    // 字典项
    formlist: PropTypes.any,   // 表单
    optionLibs: PropTypes.any, // 自定义下拉集
    card: PropTypes.object     // 搜索条件信息
    dict: PropTypes.object,     // 字典项
    formlist: PropTypes.any,    // 表单
    optionLibs: PropTypes.any,  // 自定义下拉集
    card: PropTypes.object,     // 搜索条件信息
    inputSubmit: PropTypes.any  // 回车提交事件
  }
  state = {
@@ -214,6 +215,14 @@
    }
  }
  handleSubmit = (e) => {
    e.preventDefault()
    if (this.props.inputSubmit) {
      this.props.inputSubmit()
    }
  }
  getFields() {
    const { getFieldDecorator } = this.props.form
    const fields = []
@@ -254,7 +263,7 @@
                  },
                  ...rules
                ]
              })(<Input placeholder="" autoComplete="off" disabled={item.readonly} />)}
              })(<Input placeholder="" autoComplete="off" disabled={item.readonly} onPressEnter={this.handleSubmit} />)}
            </Form.Item>
          </Col>
        )