From 44dae598a1c53594f98998c3ed011ed38fe210cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TOP=E7=B3=AF=E7=B1=B3?= <1130395124@qq.com> Date: Thu, 9 Feb 2023 20:40:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9cate=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/cate/cate.vue | 195 +++++++++++------- .../cate/template/{parent.vue => cate.vue} | 21 +- src/components/cate/template/child.vue | 79 ------- src/components/cate/template/list.vue | 81 ++++++++ src/pages/service/cate.vue | 13 +- src/pages/service/list.vue | 2 +- 6 files changed, 221 insertions(+), 170 deletions(-) rename src/components/cate/template/{parent.vue => cate.vue} (74%) delete mode 100644 src/components/cate/template/child.vue create mode 100644 src/components/cate/template/list.vue diff --git a/src/components/cate/cate.vue b/src/components/cate/cate.vue index 04f5a88..093c0d1 100644 --- a/src/components/cate/cate.vue +++ b/src/components/cate/cate.vue @@ -1,16 +1,22 @@ @@ -224,7 +262,7 @@ export default { .component-tab-view { width: 200rpx; height: 100%; - background-color: #F6F6F6; + background-color: #f6f6f6; } .component-tab-item { height: 100rpx; @@ -233,19 +271,19 @@ export default { display: flex; align-items: center; font-size: 24rpx; - color: #8B8B8B; + color: #8b8b8b; font-weight: 400; line-height: 1; } .component-tab-item-active { position: relative; - color: #4B65ED; - background: #FFFFFF; + color: #4b65ed; + background: #ffffff; } .component-tab-item-active::before { content: ""; position: absolute; - border-left: 4px solid #4B65ED; + border-left: 4px solid #4b65ed; height: 24rpx; left: 0; top: 38rpx; @@ -256,9 +294,12 @@ export default { .right-box { width: 550rpx; } -.page-view { +.page-view.cate { padding-right: 16rpx; } +.page-view.list { + padding-right: 0; +} .class-item { background-color: #ffffff; padding: 36rpx 32rpx 0 32rpx; diff --git a/src/components/cate/template/parent.vue b/src/components/cate/template/cate.vue similarity index 74% rename from src/components/cate/template/parent.vue rename to src/components/cate/template/cate.vue index 46ada90..e626976 100644 --- a/src/components/cate/template/parent.vue +++ b/src/components/cate/template/cate.vue @@ -1,7 +1,7 @@ @@ -91,11 +96,11 @@ export default { onReachBottom() {}, onPullDownRefresh() {}, methods: { - clickParent(id) { + clickCate(id) { uni.navigateTo({ - url: '/pages/service/list?id=' + id + url: "/pages/service/list?id=" + id, }); - } + }, }, }; diff --git a/src/pages/service/list.vue b/src/pages/service/list.vue index e7980d9..bb71522 100644 --- a/src/pages/service/list.vue +++ b/src/pages/service/list.vue @@ -1,7 +1,7 @@