实现微信小程序的键盘搜索功能时候,需要有三个关键属性:
1、name=‘search’;//search内容随便写2、bindconfirm='shop_search_function';//这个变量是js函数3、confirm-type='search' ;//设置右下角文字完整例子如下:
index.wxmlinput class='shop_search_input' name="search" bindconfirm='shop_search_function' type='text' confirm-type='search' placeholder="搜索" /index.jsPage({shop_search_function: function(e){ var value = e.detail.value; console.log("-------"+value); } })参考链接:
1、https://developers.weixin.qq.com/miniprogram/dev/component/input.html
2、https://blog.csdn.net/babulongbo/article/details/79652179













