|
|
@@ -3,7 +3,7 @@
|
|
|
<div class="mobile-header">
|
|
|
<a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
|
|
|
<div class="search-content">
|
|
|
- <input type="text" v-model="seekKeyword" placeholder="请输入您要查找的型号或品牌" @keyup.13="searchSeek">
|
|
|
+ <input type="text" v-model="seekKeyword" placeholder="请输入您要查找的型号或品牌" @keyup.13="searchSeek" ref="searchSeekInput" @focus="inputGetFocus()" @blur="blur()">
|
|
|
<span @click="searchSeek">
|
|
|
<i class="iconfont icon-sousuo"></i>
|
|
|
</span>
|
|
|
@@ -79,6 +79,19 @@
|
|
|
if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.page < this.allPage) {
|
|
|
this.getMoreSearch()
|
|
|
}
|
|
|
+ if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
|
|
|
+ this.$refs.searchSeekInput.blur()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ blur: function() {
|
|
|
+ // setTimeout(() => {
|
|
|
+ this.$store.dispatch('mobile/SetInputGetFocus', false)
|
|
|
+ // }, 300)
|
|
|
+ },
|
|
|
+ inputGetFocus: function() {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$store.dispatch('mobile/SetInputGetFocus', true)
|
|
|
+ }, 300)
|
|
|
},
|
|
|
getMoreSearch: function () {
|
|
|
this.page++
|