下拉框可输入或输入为下拉框对应的值

     <AutoComplete
                      style={{ width: '30%' }}
                      dataSource={REGULAR_REPLACE}
                      placeholder="请输入正则"
                      onChange={this.setRegular}
                      value={searchVal}
    />



reRegular = e => {
     const reValue = e.target.value ? e.target.value : '';
     this.setState({
          searchValue01: reValue,
     });
};

  采用antd组件中的AutoComplete即可处理

 

posted @ 2020-09-03 12:43  lipu1993  阅读(219)  评论(0)    收藏  举报