Commit 70b5e9d58029d6cd38a278decd52a525a5aeda0e
1 parent
45e23ec1
搜索组件修改
Showing
2 changed files
with
73 additions
and
46 deletions
components/diy_searchbox/diy_searchbox.wxml
| 1 | 1 | <!--pages/diy_ss/diy_ss.wxml--> |
| 2 | + <!-- wx:if="{{object.style==1}}" --> | |
| 3 | + <!-- first --> | |
| 2 | 4 | <block wx:if="{{object.style==1}}"> |
| 3 | 5 | <view class='ss' style="position: relative;"> |
| 4 | - <view bindtap='click_sear' class="s1_gk_a1" wx:if="{{first}}"> | |
| 6 | + <view bindtap='click_sear' class="s1_gk_a1" wx:if="{{false}}"> | |
| 5 | 7 | <view class='s_ge'> |
| 6 | 8 | <image src='{{imghost}}/miniapp/images/search.png'></image> |
| 7 | 9 | <text>在店铺内搜索</text> |
| ... | ... | @@ -14,6 +16,12 @@ |
| 14 | 16 | <input id="find_inp" class="find_inp" value="" |
| 15 | 17 | bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" /> |
| 16 | 18 | </view> |
| 19 | + <view class="his_str his_str1"> | |
| 20 | + <view class="item">2121</view> | |
| 21 | + <view class="item">2121</view> | |
| 22 | + <view class="item">2121</view> | |
| 23 | + <view class="clear">清除</view> | |
| 24 | + </view> | |
| 17 | 25 | </view> |
| 18 | 26 | |
| 19 | 27 | |
| ... | ... | @@ -21,50 +29,53 @@ |
| 21 | 29 | </block> |
| 22 | 30 | |
| 23 | 31 | <block wx:if="{{object.style==2}}"> |
| 24 | -<view style='background-color:{{object.top_bgcolor}}; display: flex; align-items: center; justify-content: space-around;padding:16rpx 0;'> | |
| 25 | - <view class='s2_left'> | |
| 26 | - <navigator open-type="switchTab" url="/pages/goods/categoryList/categoryList" class="s1_gk_a1"> | |
| 27 | - <image src='{{imghost}}/miniapp/images/model/nav.png' style="margin:0;position: relative;left: 6rpx"></image> | |
| 28 | - </navigator> | |
| 29 | - </view> | |
| 30 | - <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'> | |
| 31 | - <navigator wx:if="{{first}}" bindtap='click_sear' class="s1_gk_a2 flex" style='height: 100%;color:{{object.word_color?object.word_color:"#fff"}}'> | |
| 32 | - <text class="iconfont icon-search" style="font-size: 40rpx;"></text> | |
| 33 | - <text>在店铺内搜索</text> | |
| 34 | - </navigator> | |
| 35 | - <view wx:else class="s1_gk_a2" style='color:{{object.word_color?object.word_color:"#fff"}}'> | |
| 36 | - <!-- <view class="pr"> --> | |
| 37 | - <view class="flex ali-c"> | |
| 38 | - <text style="font-size: 40rpx;" class="iconfont icon-search" bindtap='sear'></text> | |
| 39 | - <input id="find_inp" class="find_inp2" value="" | |
| 40 | - bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}"/> | |
| 41 | - </view> | |
| 42 | - <view class="his_str"> | |
| 43 | - <view class="item">2121</view> | |
| 44 | - <view class="item">2121</view> | |
| 45 | - <view class="item">2121</view> | |
| 46 | - <view class="clear">清除</view> | |
| 47 | - </view> | |
| 48 | - <!-- wx:if="{{inputShowed}}" --> | |
| 32 | +<view style="position: relative;"> | |
| 33 | + <view style='background-color:{{object.top_bgcolor}}; display: flex; align-items: center; justify-content: space-around;padding:16rpx 0;'> | |
| 34 | + <view class='s2_left'> | |
| 35 | + <navigator open-type="switchTab" url="/pages/goods/categoryList/categoryList" class="s1_gk_a1"> | |
| 36 | + <image src='{{imghost}}/miniapp/images/model/nav.png' style="margin:0;position: relative;left: 6rpx"></image> | |
| 37 | + </navigator> | |
| 38 | + </view> | |
| 39 | + <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'> | |
| 40 | + <navigator wx:if="{{first}}" bindtap='click_sear' class="s1_gk_a2 flex" style='height: 100%;color:{{object.word_color?object.word_color:"#fff"}}'> | |
| 41 | + <text class="iconfont icon-search" style="font-size: 40rpx;"></text> | |
| 42 | + <text>在店铺内搜索</text> | |
| 43 | + </navigator> | |
| 44 | + <view wx:else class="s1_gk_a2" style='color:{{object.word_color?object.word_color:"#fff"}}'> | |
| 45 | + <!-- <view class="pr"> --> | |
| 46 | + <view class="flex ali-c"> | |
| 47 | + <text style="font-size: 40rpx;" class="iconfont icon-search" bindtap='sear'></text> | |
| 48 | + <input id="find_inp" class="find_inp2" value="" | |
| 49 | + bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}"/> | |
| 50 | + </view> | |
| 51 | + <view class="his_str his_str2"> | |
| 52 | + <view class="item">2121</view> | |
| 53 | + <view class="item">2121</view> | |
| 54 | + <view class="item">2121</view> | |
| 55 | + <view class="clear">清除</view> | |
| 56 | + </view> | |
| 57 | + <!-- wx:if="{{inputShowed}}" --> | |
| 58 | + | |
| 59 | + <!-- </view> --> | |
| 49 | 60 | |
| 50 | - <!-- </view> --> | |
| 51 | - | |
| 52 | - | |
| 53 | - </view> | |
| 54 | - </view> | |
| 55 | - <view class='s2_right'> | |
| 56 | - <navigator open-type="switchTab" url="/pages/cart/cart/cart" class="s1_gk_a1"> | |
| 57 | - <image src='{{imghost}}/miniapp/images/model/car.png' style="margin:0;;"></image> | |
| 58 | - </navigator> | |
| 59 | - </view> | |
| 60 | - | |
| 61 | + | |
| 62 | + </view> | |
| 63 | + </view> | |
| 64 | + <view class='s2_right'> | |
| 65 | + <navigator open-type="switchTab" url="/pages/cart/cart/cart" class="s1_gk_a1"> | |
| 66 | + <image src='{{imghost}}/miniapp/images/model/car.png' style="margin:0;;"></image> | |
| 67 | + </navigator> | |
| 68 | + </view> | |
| 69 | + | |
| 70 | + | |
| 61 | 71 | |
| 62 | - | |
| 63 | - <!-- <view class="his_str" style="bottom: -190rpx;" wx:if="{{inputShowed}}"> | |
| 64 | - <view>历史搜索</view> | |
| 65 | - <view>2121</view> | |
| 66 | - <view>2121</view> | |
| 67 | - <view>2121</view> | |
| 68 | - </view> --> | |
| 72 | + <!-- <view class="his_str" style="bottom: -190rpx;" wx:if="{{inputShowed}}"> | |
| 73 | + <view>历史搜索</view> | |
| 74 | + <view>2121</view> | |
| 75 | + <view>2121</view> | |
| 76 | + <view>2121</view> | |
| 77 | + </view> --> | |
| 78 | + </view> | |
| 69 | 79 | </view> |
| 80 | + | |
| 70 | 81 | </block> |
| 71 | 82 | \ No newline at end of file | ... | ... |
components/diy_searchbox/diy_searchbox.wxss
| ... | ... | @@ -109,7 +109,8 @@ |
| 109 | 109 | content: "\e7b3"; |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | -.his_str{ | |
| 112 | + | |
| 113 | +.his_str { | |
| 113 | 114 | position: absolute; |
| 114 | 115 | width: 600rpx; |
| 115 | 116 | top: 76rpx; |
| ... | ... | @@ -120,6 +121,14 @@ |
| 120 | 121 | box-sizing: border-box; |
| 121 | 122 | } |
| 122 | 123 | |
| 124 | +.his_str.his_str1 { | |
| 125 | + width: 708rpx; | |
| 126 | +} | |
| 127 | + | |
| 128 | +.his_str1.his_str { | |
| 129 | + top: 96rpx; | |
| 130 | +} | |
| 131 | + | |
| 123 | 132 | .pr { |
| 124 | 133 | position: relative; |
| 125 | 134 | } |
| ... | ... | @@ -131,6 +140,7 @@ |
| 131 | 140 | .item { |
| 132 | 141 | padding: 0 20rpx; |
| 133 | 142 | border-bottom: 2rpx solid #f0f0f0; |
| 143 | + line-height: 60rpx; | |
| 134 | 144 | } |
| 135 | 145 | /* .item ~ .item { |
| 136 | 146 | border-top: 2rpx solid #f0f0f0; |
| ... | ... | @@ -139,4 +149,10 @@ |
| 139 | 149 | .clear { |
| 140 | 150 | text-align: right; |
| 141 | 151 | padding: 0 20rpx; |
| 142 | -} | |
| 143 | 152 | \ No newline at end of file |
| 153 | + line-height: 60rpx; | |
| 154 | +} | |
| 155 | + | |
| 156 | +/* .w100 { | |
| 157 | + width: 100%; | |
| 158 | + box-sizing: border-box; | |
| 159 | +} */ | |
| 144 | 160 | \ No newline at end of file | ... | ... |