| | |
| | | |
| | | class MainSearch extends Component { |
| | | static propTpyes = { |
| | | menu: PropTypes.object, // 菜单信息 |
| | | dict: PropTypes.object, // 字典项 |
| | | supMenuList: PropTypes.any // 表格数据 |
| | | menu: PropTypes.object, // 菜单信息 |
| | | dict: PropTypes.object, // 字典项 |
| | | supMenuList: PropTypes.any, // 表格数据 |
| | | inputSubmit: PropTypes.func // 回车提交 |
| | | } |
| | | |
| | | state = { |
| | |
| | | }) |
| | | } |
| | | |
| | | onEnterSubmit = (e) => { |
| | | // 表单回车提交 |
| | | if (e.key !== 'Enter') return |
| | | |
| | | this.props.inputSubmit && this.props.inputSubmit() |
| | | } |
| | | |
| | | render() { |
| | | const { getFieldDecorator } = this.props.form |
| | | const { menu } = this.state |
| | |
| | | } |
| | | |
| | | return ( |
| | | <Form {...formItemLayout} style={{paddingRight: '20px'}}> |
| | | <Form {...formItemLayout} style={{paddingRight: '20px'}} onKeyDown={this.onEnterSubmit}> |
| | | <Row gutter={24}> |
| | | <Col span={24}> |
| | | <Form.Item label={'一级菜单'}> |
| | |
| | | message: this.props.dict['form.required.input'] + '菜单名称!' |
| | | } |
| | | ] |
| | | })(<Input placeholder="" autoComplete="off" />)} |
| | | })(<Input placeholder="" autoFocus autoComplete="off" />)} |
| | | </Form.Item> |
| | | </Col> |
| | | <Col span={24}> |