1、wxml代碼:
//搜索框
<input type='text' confirm-type='search' bindinput='input1' bindconfirm='confirm1' style='border:1px solid #f00'/>
<view wx:for="{{hosList}}" wx:for-item="h">
<text wx:if="{{h.show}}">{{h.name}}</text>
</view>
2、js代碼:


在頁面中,就能實現搜索的功能了

1、wxml代碼:
//搜索框
<input type='text' confirm-type='search' bindinput='input1' bindconfirm='confirm1' style='border:1px solid #f00'/>
<view wx:for="{{hosList}}" wx:for-item="h">
<text wx:if="{{h.show}}">{{h.name}}</text>
</view>
2、js代碼:


在頁面中,就能實現搜索的功能了

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。