闫增涛
2024-03-06 21f34f1fc290cd129d24df2b25025e47e6ac028a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<view class="search-page">
  <t-search
    t-class-input-container="t-class__input-container"
    t-class-input="t-search__input"
    value="{{searchValue}}"
    leftIcon=""
    placeholder="iPhone12pro"
    bind:submit="handleSubmit"
    focus
  >
    <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" />
  </t-search>
  <view class="search-wrap">
    <view class="history-wrap">
      <view class="search-header">
        <text class="search-title">历史搜索</text>
        <text class="search-clear" bind:tap="handleClearHistory">清除</text>
      </view>
      <view class="search-content">
        <view
          class="search-item"
          hover-class="hover-history-item"
          wx:for="{{historyWords}}"
          bind:tap="handleHistoryTap"
          bindlongpress="deleteCurr"
          data-index="{{index}}"
          wx:key="*this"
        >
          {{item}}
        </view>
      </view>
    </view>
    <view class="popular-wrap">
      <view class="search-header">
        <text class="search-title">热门搜索</text>
      </view>
      <view class="search-content">
        <view
          class="search-item"
          hover-class="hover-history-item"
          wx:for="{{popularWords}}"
          bind:tap="handleHistoryTap"
          data-index="{{index}}"
          wx:key="*this"
        >
          {{item}}
        </view>
      </view>
    </view>
  </view>
  <t-dialog
    visible="{{dialogShow}}"
    content="{{dialog.message}}"
    bindconfirm="confirm"
    bind:close="close"
    confirm-btn="确定"
    cancel-btn="{{dialog.showCancelButton ? '取消' : null}}"
    t-class-confirm="dialog__button-confirm"
    t-class-cancel="dialog__button-cancel"
  />
</view>