微信小程序开发之带搜索记录的搜索框
发表时间:2021-5-11
发布人:葵宇科技
浏览次数:153
实现功能:点击搜索框,有搜索记录时以下拉菜单显示,点击下拉子菜单,将数据赋值到搜索框,点击搜索图标搜索,支持清空历史记录,可手动输入和清空查询关键字,
UI:

wxml:
<!--查询历史记录数据--><view class="ddclass" style="margin-left: 50rpx;z-index:80" hidden="{{!StorageFlag}}" style="z-index:100"><view wx:for="{{sercherStorage}}" wx:key="item.id"><view class="liclass" style="color:#ec9e14;border-bottom:0;" id="{{item.id}}" bindtap="tapSercherStorage"><text style="width:100rpx">{{item.name}}</text>








