wxml
<view class='search_input'>
<input value='{{search}}' placeholder='请输入姓名' bindblur='changeSearch' bindconfirm='changeSearch' bindinput='changeSearch'></input>
</view>
js
/**
* 页面的初始数据
*/
data: {
search: ''
}
/**
* 监听搜索内容
*/
changeSearch: function(event) {
let that = this;
var inputSearch = event.detail.value;
that.setData({
search: inputSearch
})
}