微信小程序實現列表搜索功能


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刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM