Commit 80910225eb5a7b1986119ee352f97dd9da9832f6

Authored by yvan.ni
1 parent 3629bfd3

自定义顶部搜索框

components/diy_searchbox/diy_searchbox.wxml
@@ -34,14 +34,14 @@ @@ -34,14 +34,14 @@
34 </view> 34 </view>
35 35
36 <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'> 36 <view class='s2_cen' style='background-color:{{object.inner_bgcolor}}'>
37 - <navigator wx:if="{{first}}" bindtap='click_sear' class="s1_gk_a2 flex" style="height: 100%;">  
38 - <image src='/public/static/images/model/select.png'></image>  
39 - <text style='color:{{object.word_color?object.word_color:"#fff"}}'>在店铺内搜索</text> 37 + <navigator wx:if="{{first}}" bindtap='click_sear' class="s1_gk_a2 flex" style='height: 100%;color:{{object.word_color?object.word_color:"#fff"}}'>
  38 + <text class="iconfont icon-search" style="font-size: 40rpx;"></text>
  39 + <text>在店铺内搜索</text>
40 </navigator> 40 </navigator>
41 - <navigator wx:else class="s1_gk_a2 flex" style="height: 100%;">  
42 - <image src='/public/static/images/model/select.png' bindtap='sear'></image>  
43 - <input id="find_inp" class="find_inp2" value=""  
44 - bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" /> 41 + <navigator wx:else class="s1_gk_a2 flex" style='height: 100%;color:{{object.word_color?object.word_color:"#fff"}}'>
  42 + <text style="font-size: 40rpx;" class="iconfont icon-search" bindtap='sear'></text>
  43 + <input id="find_inp" class="find_inp2" value=""
  44 + bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" />
45 </navigator> 45 </navigator>
46 </view> 46 </view>
47 47
components/diy_searchbox/diy_searchbox.wxss
@@ -85,4 +85,26 @@ @@ -85,4 +85,26 @@
85 .flex{ display: flex; align-items: center;} 85 .flex{ display: flex; align-items: center;}
86 .find_img{margin: 0 20rpx; } 86 .find_img{margin: 0 20rpx; }
87 .find_inp{text-align: left; width: 620rpx;} 87 .find_inp{text-align: left; width: 620rpx;}
88 -.find_inp2{text-align: left; width: 520rpx;}  
89 \ No newline at end of file 88 \ No newline at end of file
  89 +.find_inp2{text-align: left; width: 520rpx;}
  90 +
  91 +
  92 +@font-face {font-family: "iconfont";
  93 + src: url('iconfont.eot?t=1607568098927'); /* IE9 */
  94 + src: url('iconfont.eot?t=1607568098927#iefix') format('embedded-opentype'), /* IE6-IE8 */
  95 + url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALAAAsAAAAABmAAAAJ1AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcApsgQwBNgIkAwgLBgAEIAWEbQcwG7IFyC6wbdiTQGyMi0WNir+9Fm8e4RAP/6397pud/aJ4Uk0uWTSRSTRKIkFspMDpGgqN+fZzt/8RazTS0XwWUU8Ta1/um9zuTxpailoSb/A6tG0kPJvEFYB1Rtl89ekqqzifuJ/6V0ADyXe+m0tEUFRyJODApgOMKhrZJjTjDWMXuITjBBpGtXCdDU2EQIXMGheIJ1lkQEXOK8ssURMqNUuzeAOlWnqhrvEafj9+rUQFSVmwSi4fB3nQ83lsp9CTxUkPPgF8BLS6RIFlQCZua6PnaMHotEa0xCSwr8Lg87hY9C1ir0bB/jorvwWGoeiexK7kVvMTyHH3KGBr1C2kvho1nw+v5pbDPZGLXOPI7W04lwtV8CN5NHtN7tJJiwuUQ9cnXjb3PqlBXYtDLSxSjl26sODsxV2ZjMvjTmTScSpBpdM58XQG9LB+VlxQVwLBn+bvdvzWmhl8/HtoyPrZqe3ZFvwhcc+mrEstc8qquNaejI4am9DQwD/s7HM/Vjd4O8lQM3hT9qqRFIWaaVKmLaPUtIaKmkM0LBle3dQPo0WuY9EcQOixj6TjHYUeN6RMu0NpyCsqeoJGw33Ubtk0G3JVP0YMQTxks1DmTENwrKQqKgwg0dEYnJWGjAjCSTkAfW5vMTGMDITnmJFMiX5CBChgU4dD4DSkaSa0sKkgjrglQqw2j0eoe5ObM3VQ5RSGMAiEB7GyIBnHZBD8zkRV6fMBiMihYeCWshpvBIIlyb1DPm7eHqRhldGr7F5eSUoR+RGEABJgJh00BAYhGo0JsuoHKRAO4SaNCFvaeOx2Ql+Ve32N/gGFrApLn8LuV6g8IwZzEgA=') format('woff2'),
  96 + url('iconfont.woff?t=1607568098927') format('woff'),
  97 + url('iconfont.ttf?t=1607568098927') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
  98 + url('iconfont.svg?t=1607568098927#iconfont') format('svg'); /* iOS 4.1- */
  99 +}
  100 +
  101 +.iconfont {
  102 + font-family: "iconfont" !important;
  103 + font-size: 16px;
  104 + font-style: normal;
  105 + -webkit-font-smoothing: antialiased;
  106 + -moz-osx-font-smoothing: grayscale;
  107 +}
  108 +
  109 +.icon-search:before {
  110 + content: "\e7b3";
  111 +}