index.wxml 602 B

12345678910111213141516171819
  1. <van-search placeholder="请输入搜索关键词" focus bind:search="search" />
  2. <van-empty wx:if="{{ !list || list.length == 0 }}" description="暂无历史搜索" />
  3. <van-cell-group wx:if="{{ list && list.length > 0 }}" title="历史搜索">
  4. <van-cell wx:for="{{list}}" wx:key="*this">
  5. <view slot="title">
  6. <view data-idx="{{ index }}" bindtap="go">{{ item }}</view>
  7. </view>
  8. <van-tag
  9. closeable
  10. size="medium"
  11. type="primary"
  12. id="primary"
  13. data-idx="{{ index }}"
  14. bind:close="onClose"
  15. >
  16. 删除
  17. </van-tag>
  18. </van-cell>
  19. </van-cell-group>