onChange 輸入內容的回調this
onPressEnter 按下回車的回調spa
原來的代碼:
<Input
defaultValue={item.value1}
style={{width: '130px'}}
flag="switch1"
onChange={event => this.handleChange(event)}
/>
更改後:
<Input
defaultValue={item.value1}
style={{width: '130px'}}
flag="switch1"
onPressEnter={event => this.handleChange(event)}
/>
效果以下: