From e603c97dbe7a4f1dbd6445e00383ed651182e0fe Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 03 三月 2020 17:09:11 +0800 Subject: [PATCH] 2020-03-03 --- src/templates/tableshare/searchform/index.jsx | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/templates/tableshare/searchform/index.jsx b/src/templates/tableshare/searchform/index.jsx index 1e3d35d..51a0c5b 100644 --- a/src/templates/tableshare/searchform/index.jsx +++ b/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> ) -- Gitblit v1.8.0