From 4666f8fb7b25485e2d5b4fc2430b00d4056202ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Mon, 3 Nov 2025 16:29:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=B0=E5=AE=B6=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E6=90=9C=E7=B4=A2=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/homeServer/searchAll/index.css | 51 ++-- packages/homeServer/searchAll/index.vue | 312 ++++++++++++------------ packages/localLife/detail/index.css | 4 +- 3 files changed, 193 insertions(+), 174 deletions(-) diff --git a/packages/homeServer/searchAll/index.css b/packages/homeServer/searchAll/index.css index 869c5656..e9faf491 100644 --- a/packages/homeServer/searchAll/index.css +++ b/packages/homeServer/searchAll/index.css @@ -44,7 +44,7 @@ page { margin-left: 200rpx; } -.activeFilter{ +.activeFilter { color: #FF370B; } @@ -205,71 +205,86 @@ page { padding: 20rpx 30rpx; border-bottom: 1rpx solid #f5f5f5; } + .filter-title { font-size: 28rpx; color: #333; margin-bottom: 20rpx; font-weight: bold; } + .filter-options { display: flex; flex-wrap: wrap; gap: 15rpx; } + .filter-option { - background: #f5f5f5; - border-radius: 50rpx; + border-radius: 10rpx; + border: 1rpx solid #cccccc; padding: 12rpx 30rpx; font-size: 24rpx; color: #666; white-space: nowrap; } + .filter-option.active { background: #ff370b; color: white; } + .price-range { display: flex; align-items: center; gap: 20rpx; margin-top: 10rpx; } + .price-input { flex: 1; height: 60rpx; - background: #f5f5f5; + border: 1rpx solid #cccccc; border-radius: 10rpx; padding: 0 20rpx; font-size: 24rpx; - border: none; } + .price-separator { font-size: 28rpx; color: #999; } + .filter-buttons { display: flex; justify-content: space-between; padding: 20rpx 30rpx; margin-top: 10rpx; } + .reset-button { width: 200rpx; height: 70rpx; - border: 1rpx solid #7abbff; + border: 1rpx solid #cccccc; border-radius: 50rpx; - background: #f0f7ff; - color: #409eff; + background: #d9d9d9; + color: black; + display: flex; + align-items: center; + justify-content: center; font-size: 28rpx; } + .confirm-button { width: 200rpx; height: 70rpx; - background: #409eff; + background: #ff370b; border-radius: 50rpx; color: white; font-size: 28rpx; - border: none; + display: flex; + align-items: center; + justify-content: center; + font-size: 28rpx; } .MasterItem_Info_right_1 { @@ -401,6 +416,7 @@ page { .local span { font-weight: 700; + margin: 0 10rpx; } .filterMore1 { @@ -409,27 +425,32 @@ page { overflow: hidden; overflow-x: auto; white-space: nowrap; - margin-top: 20rpx; + margin: 40rpx 0 20rpx 0; } .filterMoreItem { - font-size: 28rpx; + font-size: 26rpx; color: #222222; display: flex; align-items: center; - background-color: #f6f6fa; padding: 0 20rpx; margin-right: 10rpx; margin-right: 20rpx; - border-radius: 20rpx; + border-radius: 10rpx; + border: 1rpx solid #cccccc; padding: 10rpx 20rpx; } +.filterMoreItem-active { + color: #ff702c !important; + border: 1rpx solid #ff702c; +} + .filterMore2_item { display: flex; align-items: center; justify-content: space-between; - margin-bottom: 20rpx; + margin: 0 10rpx 45rpx 10rpx; color: #999; } diff --git a/packages/homeServer/searchAll/index.vue b/packages/homeServer/searchAll/index.vue index 587c30a1..69665d80 100644 --- a/packages/homeServer/searchAll/index.vue +++ b/packages/homeServer/searchAll/index.vue @@ -1,16 +1,15 @@ @@ -339,18 +338,8 @@ export default { }; }, watch: { - show1(val) { - if (!val) this.selectedFilter = null; - }, - show2(val) { - if (!val) this.selectedFilter = null; - }, - show3(val) { - if (!val) this.selectedFilter = null; - }, - show6(val) { - if (!val) this.selectedFilter = null; - }, + // 修改watch逻辑,只在点击空白区域关闭筛选器时清除选中状态 + // 而不是在切换不同筛选器时清除 }, methods: { masterInfo() { @@ -401,6 +390,9 @@ export default { this.isShowDia = false; }, showDialog(index) { + // 先更新选中的过滤器ID + this.selectedFilter = index; + // 然后处理显示状态 this[`show${index}`] = !this[`show${index}`]; this.logOtherButtons(index); this.isShowDia = this[`show${index}`]; @@ -412,6 +404,14 @@ export default { } } }, + closeAllFilters() { + // 关闭所有筛选面板并重置选中状态 + for (let i = 1; i <= 6; i++) { + this[`show${i}`] = false; + } + this.isShowDia = false; + this.selectedFilter = null; + }, }, onReady() {}, diff --git a/packages/localLife/detail/index.css b/packages/localLife/detail/index.css index 8186419e..df7af5f4 100644 --- a/packages/localLife/detail/index.css +++ b/packages/localLife/detail/index.css @@ -128,9 +128,7 @@ page { font-weight: 500; font-size: 36rpx; color: #FFFFFF; - /* display: inline-block; */ - /* padding: 10rpx 44rpx; */ - background: #cccccc; + background: #b1b0b0; border-radius: 100rpx 100rpx 100rpx 100rpx; margin-right: 20rpx; }