Commit ab6b09d4 authored by Damon's avatar Damon

fix: 搜索问题

parent a00dcbe3
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
bg-color="#fff" bg-color="#fff"
v-model="keyword" v-model="keyword"
@custom="search" @custom="search"
@search="search"
></u-search> ></u-search>
</view> </view>
......
...@@ -269,11 +269,11 @@ export default { ...@@ -269,11 +269,11 @@ export default {
blur() { blur() {
// 最开始使用的是监听图标@touchstart事件,自从hx2.8.4后,此方法在微信小程序出错 // 最开始使用的是监听图标@touchstart事件,自从hx2.8.4后,此方法在微信小程序出错
// 这里改为监听点击事件,手点击清除图标时,同时也发生了@blur事件,导致图标消失而无法点击,这里做一个延时 // 这里改为监听点击事件,手点击清除图标时,同时也发生了@blur事件,导致图标消失而无法点击,这里做一个延时
setTimeout(() => { // setTimeout(() => {
this.focused = false; // this.focused = false;
}, 100) // }, 100)
this.show = false; // this.show = false;
this.$emit('blur', this.keyword); // this.$emit('blur', this.keyword);
}, },
// 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页 // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页
clickHandler() { clickHandler() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment