| | |
| | | |
| | | if (item.type === 'text') { |
| | | if (item.inputType === 'search') { |
| | | content = <Search placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onSearch={this.handleSubmit} enterButton/> |
| | | content = <Search allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onSearch={this.handleSubmit} enterButton/> |
| | | } else { |
| | | content = <Input placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSubmit} /> |
| | | content = <Input allowClear placeholder={item.labelShow === 'false' ? item.label : ''} autoComplete="off" onPressEnter={this.handleSubmit} /> |
| | | } |
| | | } else if (item.type === 'select' || item.type === 'link' || item.type === 'multiselect') { |
| | | content = (<MKSelect config={item}/>) |
| | |
| | | return fields |
| | | } |
| | | |
| | | handleSubmit = () => { |
| | | handleSubmit = (e) => { |
| | | e.stopPropagation() |
| | | // 回车或点击搜索 |
| | | this.props.form.validateFields((err, values) => { |
| | | if (err) return |