<input type='text' placeholder='搜索书名' focus='true' confirm-type='search' bindinput='input' bindconfirm='search'></input>其中,bindconfirm就是回车事件
2.1以上版本开始支持keyCode:
<input bindinput="input" />获取keycode:
bindKeyInput(e) { console.log(e.detail.keyCode) }
<input type='text' placeholder='搜索书名' focus='true' confirm-type='search' bindinput='input' bindconfirm='search'></input>其中,bindconfirm就是回车事件
<input bindinput="input" />获取keycode:
bindKeyInput(e) { console.log(e.detail.keyCode) }