index.wxml 1.5 KB

123456789101112131415161718192021222324252627
  1. <view class="Yl_nav_box">
  2. <view class="mian">
  3. <navigator class="item" url="#" wx:for="{{list}}" wx:key="index" style="width: {{item.width}};" bindtap="onClick" data-item="{{item}}">
  4. <text class="iconfont {{item.icon}}" style="color: {{item.color}};" />
  5. <text class="label">{{item.label}}</text>
  6. </navigator>
  7. </view>
  8. <navigator wx:if="{{search}}" class="search" url="#" bindtap="clickSearch">
  9. <text class="iconfont icon-a-sousuolansousuo" style="color: {{startUsing?'var(--assist)':''}};" />
  10. </navigator>
  11. </view>
  12. <van-transition show="{{ startUsing }}" custom-class="block">
  13. <van-search custom-class='Yl_search' value="{{ condition }}" bindfocus='onFocus' bind:blur='onBlur' shape="round" placeholder="请输入搜索关键词" bind:search='startSearch' bind:clear='endSearch' />
  14. <view class="Yl_history" wx:if="{{record}}">
  15. <view class="label" wx:if="{{showHistory && history.length}}">
  16. <text>最近搜索记录</text>
  17. <!-- <text class="iconfont icon-guanlian-shanchu" style="font-size: 24rpx;" bindtap="deleteHistory" /> -->
  18. </view>
  19. <view class="content" wx:if="{{showHistory}}">
  20. <!-- closeable -->
  21. <van-tag wx:for="{{history}}" style="margin-left: 6rpx;" wx:key="item" size="medium" round data-name="{{item}}" catch:close="delteTag" catchtap="clickTag">
  22. {{item}}
  23. </van-tag>
  24. </view>
  25. </view>
  26. </van-transition>