<!--mycomponent/searchHistory/searchHistory.wxml-->
<view style="background: #fff; overflow: hidden;">
  <view class="search-history" wx:if="{{(searchHistoryList.length > 0) && showHistory}}">
    <view class="tip-words">
      <view class="search-head">
        <span>搜索历史</span>
        <van-icon style="font-size: 40rpx" name="delete" bindtap="clearHistoryItems"></van-icon>
      </view>
    </view>
    <view 
      class="tag" 
      data-item="{{item.name}}"
      bindtap="clickTag" 
      wx:for="{{searchHistoryList}}"
      wx:key="item.key"
    >
      <text class="text">{{item.name}}</text>
      <text 
      class="delete"
      catchtap="popHistoryItems"
      data-item="{{item.name}}"
      >X</text>
    </view>
  </view>
</view>
