From 8555acb022c60c6b50de2425f3070d5ccd857596 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Wed, 23 Jun 2021 09:31:33 +0800 Subject: [PATCH] 搜索框的历史搜索事件 --- components/diy_searchbox/diy_searchbox.js | 4 ++++ components/diy_searchbox/diy_searchbox.wxml | 18 ++++++++++++++++-- components/diy_searchbox/diy_searchbox.wxss | 9 +++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/components/diy_searchbox/diy_searchbox.js b/components/diy_searchbox/diy_searchbox.js index 75b51e0..a6a6014 100644 --- a/components/diy_searchbox/diy_searchbox.js +++ b/components/diy_searchbox/diy_searchbox.js @@ -41,6 +41,10 @@ Component({ return false; } this.setData({first:0,inputShowed:1,inputval:''}); + + + + }, onblur:function(){ diff --git a/components/diy_searchbox/diy_searchbox.wxml b/components/diy_searchbox/diy_searchbox.wxml index d5e8e66..ce54c46 100644 --- a/components/diy_searchbox/diy_searchbox.wxml +++ b/components/diy_searchbox/diy_searchbox.wxml @@ -1,6 +1,6 @@ - + @@ -15,11 +15,18 @@ bindconfirm="sear" bindinput='set_input' focus="{{inputShowed}}" bindblur="onblur" /> + + + 历史搜索 + 2121 + 2121 + 2121 + - + @@ -41,5 +48,12 @@ + + + 历史搜索 + 2121 + 2121 + 2121 + \ No newline at end of file diff --git a/components/diy_searchbox/diy_searchbox.wxss b/components/diy_searchbox/diy_searchbox.wxss index 168ff87..7285c2d 100644 --- a/components/diy_searchbox/diy_searchbox.wxss +++ b/components/diy_searchbox/diy_searchbox.wxss @@ -108,3 +108,12 @@ .icon-search:before { content: "\e7b3"; } + +.his_str{ + text-align: left; + position: absolute; + bottom: -110%; + z-index: 100; + background-color: #fff; + width: 94%; +} \ No newline at end of file -- libgit2 0.21.4