直接上代码 wxml <input type='text' bindinput="valueInput" value='{{searchValue}}' focus="{{focus}}" placeholder='商品名称/订单号' placeholder-class='placeholder' bindinput='setValue'></input> js valueInput:function(e){ this.setData({ value: e.detail.value }) },