From 6f0a620af1cfd98e9592ba3dff68e7d0e10807a4 Mon Sep 17 00:00:00 2001 From: wayn <1669738430@qq.com> Date: Sun, 26 Nov 2023 15:24:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Tabbar/index.vue | 24 ++++++- src/utils/request.js | 2 +- src/views/cart/index.vue | 23 +++++-- src/views/cart/modules/Item.vue | 69 ++++++++++++++++---- src/views/cart/modules/Tabbar.vue | 18 ++--- src/views/detail/modules/Description.vue | 2 +- src/views/order/confirm/modules/ListItem.vue | 4 +- src/views/order/detail/index.vue | 18 ++--- src/views/search/index.vue | 57 +++++----------- src/views/search/list.vue | 12 ++-- src/views/search/modules/FilterBar.vue | 2 - src/views/search/modules/NavBar.vue | 5 ++ vue.config.js | 11 ++++ 13 files changed, 155 insertions(+), 92 deletions(-) diff --git a/src/components/Tabbar/index.vue b/src/components/Tabbar/index.vue index 33bce86..fd39c10 100644 --- a/src/components/Tabbar/index.vue +++ b/src/components/Tabbar/index.vue @@ -4,7 +4,7 @@ 首页 分类 - 购物车 + 购物车 我的 @@ -14,16 +14,36 @@ - diff --git a/src/views/search/list.vue b/src/views/search/list.vue index 8eb07bd..5a0a345 100644 --- a/src/views/search/list.vue +++ b/src/views/search/list.vue @@ -1,7 +1,7 @@ @@ -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' + } + } + } } }