Fix:删掉输入框内容后,输入框应该直接是空白的,不要显示浮动关键词

This commit is contained in:
linxi
2025-03-03 14:21:58 +08:00
parent f36bf5ca73
commit 754713282b
+7 -6
View File
@@ -155,8 +155,8 @@ export default {
if(val) { if(val) {
this.showkey = false this.showkey = false
} else { } else {
this.showkey = true // this.showkey = true
this.currentSearch = this.recommendKeyword[0] // this.currentSearch = this.recommendKeyword[0]
} }
} }
}, },
@@ -176,6 +176,7 @@ export default {
this.$yrouter.switchTab('/pages/cart') this.$yrouter.switchTab('/pages/cart')
}, },
showHistory() { showHistory() {
this.currentSearch = this.recommendKeyword[0]
if(this.showkey) return if(this.showkey) return
if(this.search) { if(this.search) {
this.showkey = false this.showkey = false
@@ -185,10 +186,10 @@ export default {
}, },
hideHistory() { hideHistory() {
if(!this.search) { // if(!this.search) {
this.showkey = true // this.showkey = true
return // return
} // }
this.showkey = false this.showkey = false
}, },
change(e) { change(e) {