Commit 8555acb022c60c6b50de2425f3070d5ccd857596
1 parent
305bba84
搜索框的历史搜索事件
Showing
3 changed files
with
29 additions
and
2 deletions
components/diy_searchbox/diy_searchbox.js
components/diy_searchbox/diy_searchbox.wxml
1 | <!--pages/diy_ss/diy_ss.wxml--> | 1 | <!--pages/diy_ss/diy_ss.wxml--> |
2 | <block wx:if="{{object.style==1}}"> | 2 | <block wx:if="{{object.style==1}}"> |
3 | - <view class='ss' > | 3 | + <view class='ss' style="position: relative;"> |
4 | <view bindtap='click_sear' class="s1_gk_a1" wx:if="{{first}}"> | 4 | <view bindtap='click_sear' class="s1_gk_a1" wx:if="{{first}}"> |
5 | <view class='s_ge'> | 5 | <view class='s_ge'> |
6 | <image src='{{imghost}}/miniapp/images/search.png'></image> | 6 | <image src='{{imghost}}/miniapp/images/search.png'></image> |
@@ -15,11 +15,18 @@ | @@ -15,11 +15,18 @@ | ||
15 | bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" /> | 15 | bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" /> |
16 | </view> | 16 | </view> |
17 | </view> | 17 | </view> |
18 | + | ||
19 | + <view class="his_str" wx:if="{{inputShowed}}"> | ||
20 | + <view class="h_title">历史搜索</view> | ||
21 | + <view class="item">2121</view> | ||
22 | + <view class="item">2121</view> | ||
23 | + <view class="item">2121</view> | ||
24 | + </view> | ||
18 | </view> | 25 | </view> |
19 | </block> | 26 | </block> |
20 | 27 | ||
21 | <block wx:if="{{object.style==2}}"> | 28 | <block wx:if="{{object.style==2}}"> |
22 | -<view style='background-color:{{object.top_bgcolor}}; display: flex; align-items: center; justify-content: space-around; height: 100rpx;' > | 29 | +<view style='background-color:{{object.top_bgcolor}}; display: flex; align-items: center; justify-content: space-around; height: 100rpx;position: relative;' > |
23 | <view class='s2_left'> | 30 | <view class='s2_left'> |
24 | <navigator open-type="switchTab" url="/pages/goods/categoryList/categoryList" class="s1_gk_a1"> | 31 | <navigator open-type="switchTab" url="/pages/goods/categoryList/categoryList" class="s1_gk_a1"> |
25 | <image src='{{imghost}}/miniapp/images/model/nav.png' style="margin:0;position: relative;left: 6rpx"></image> | 32 | <image src='{{imghost}}/miniapp/images/model/nav.png' style="margin:0;position: relative;left: 6rpx"></image> |
@@ -41,5 +48,12 @@ | @@ -41,5 +48,12 @@ | ||
41 | <image src='{{imghost}}/miniapp/images/model/car.png' style="margin:0;;"></image> | 48 | <image src='{{imghost}}/miniapp/images/model/car.png' style="margin:0;;"></image> |
42 | </navigator> | 49 | </navigator> |
43 | </view> | 50 | </view> |
51 | + | ||
52 | + <view class="his_str" style="bottom: -190rpx;" wx:if="{{inputShowed}}"> | ||
53 | + <view>历史搜索</view> | ||
54 | + <view>2121</view> | ||
55 | + <view>2121</view> | ||
56 | + <view>2121</view> | ||
57 | + </view> | ||
44 | </view> | 58 | </view> |
45 | </block> | 59 | </block> |
46 | \ No newline at end of file | 60 | \ No newline at end of file |
components/diy_searchbox/diy_searchbox.wxss
@@ -108,3 +108,12 @@ | @@ -108,3 +108,12 @@ | ||
108 | .icon-search:before { | 108 | .icon-search:before { |
109 | content: "\e7b3"; | 109 | content: "\e7b3"; |
110 | } | 110 | } |
111 | + | ||
112 | +.his_str{ | ||
113 | + text-align: left; | ||
114 | + position: absolute; | ||
115 | + bottom: -110%; | ||
116 | + z-index: 100; | ||
117 | + background-color: #fff; | ||
118 | + width: 94%; | ||
119 | +} | ||
111 | \ No newline at end of file | 120 | \ No newline at end of file |