-
-
@@ -48,7 +48,7 @@ export default {
data() {
return {
searchText: '',
- curSearchText: '',
+ focus: false,
list: [],
pageSize: 10,
pageNum: 1,
@@ -73,7 +73,6 @@ export default {
})
const { keyword } = this.$route.query
this.searchText = keyword
- this.curSearchText = keyword
this.keyword = keyword
this.getList()
},
@@ -112,6 +111,9 @@ export default {
}
})
},
+ handleFocus() {
+ this.focus = true
+ },
changeGoods(val) {
// 筛选
if (val['search'] === 'filterNew') {
diff --git a/src/views/search/modules/FilterBar.vue b/src/views/search/modules/FilterBar.vue
index 07a1249..22f051c 100644
--- a/src/views/search/modules/FilterBar.vue
+++ b/src/views/search/modules/FilterBar.vue
@@ -2,8 +2,6 @@
-
销量
diff --git a/src/views/search/modules/NavBar.vue b/src/views/search/modules/NavBar.vue
index 05ca929..416f7bd 100644
--- a/src/views/search/modules/NavBar.vue
+++ b/src/views/search/modules/NavBar.vue
@@ -13,6 +13,7 @@
show-action
clearable
autofocus
+ @focus="onFocus"
@search="onSearch"
@cancel="onCancel"
>
@@ -55,6 +56,9 @@ export default {
// }
// },
methods: {
+ onFocus() {
+ this.$emit('handleFocus')
+ },
onSearch() {
const key = this.keyword.trim() || this.defaultSearch.trim()
if (!key) {
@@ -66,6 +70,7 @@ export default {
},
onCancel() {
this.value = ''
+ this.$router.back()
}
}
}
diff --git a/vue.config.js b/vue.config.js
index b48485e..3e119cc 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -112,5 +112,16 @@ module.exports = {
// https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
config.optimization.runtimeChunk('single')
})
+ },
+ css: {
+ loaderOptions: {
+ less: {
+ // 若 less-loader 版本小于 6.0,请移除 lessOptions 这一级,直接配置选项。
+ modifyVars: {
+ // 直接覆盖变量
+ 'tabbar-item-icon-size': '24px'
+ }
+ }
+ }
}
}