From a7b3d0b4c382f3e55593a866464202dd938477d7 Mon Sep 17 00:00:00 2001 From: Trae AI Date: Sat, 27 Dec 2025 10:26:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=90=9C=E7=B4=A2=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E5=B9=B3=E6=BB=91=E9=9A=90=E8=97=8F=E6=95=88=E6=9E=9C?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E7=AA=81=E7=84=B6=E6=94=B6=E7=BC=A9?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 2 +- pages/index/index.wxss | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 0920df3..ab9f26e 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -832,7 +832,7 @@ Page({ if (scrollTop > 50) { // 当滚动距离超过50rpx时,开始逐渐隐藏 - const hideProgress = Math.min((scrollTop - 50) / 100, 1); // 0-1的隐藏进度 + const hideProgress = Math.min((scrollTop - 50) / 150, 1); // 0-1的隐藏进度,延长隐藏过程 searchSectionOpacity = 1 - hideProgress; searchSectionTransform = -20 * hideProgress; diff --git a/pages/index/index.wxss b/pages/index/index.wxss index d86d98e..dd3dcaa 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -27,14 +27,17 @@ page { overflow: hidden; transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); will-change: opacity, transform, padding, margin, max-height; + max-height: 200rpx; /* 设置一个具体的最大高度,确保过渡效果生效 */ } -/* 顶部搜索区域完全隐藏状态 - 用于收缩高度 */ +/* 顶部搜索区域完全隐藏状态 - 用于平滑收缩高度 */ .top-hidden { max-height: 0; padding: 0; margin-bottom: 0; pointer-events: none; + opacity: 0; + transform: translateY(-100%); } /* 标题样式 */