使用wx.hideKeyboard(),提示input not exists,实际键盘未收回,如何解决?
js
// 获取搜索框内容
getkeyvalue:function(e){
this.setData({
keyword:e.detail.value,
})
},
// 搜索提交功能
search: function (e) {
wx.hideKeyboard();
var keyword = this.data.keyword;
App.sr.track('search', {
"keyword": keyword?keyword:' ',
})
console.log(keyword)
wx.navigateTo({
url: '/pages/category/category?keyword=' + keyword+'&searchtype=plp'
})
},
wxml
<form class="input" >
<input name="search" class="keywrod" value="{{keyword}}" confirm-type="search" bindinput="getkeyvalue" bindconfirm="search" />
<button plain hover-class="none" style="border:none; z-index:1;" class="icon-warp" bindtap="search" >
<text>| </text>
<image class="icon"></image>
</button>
</form>
请问解决了吗
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)