From 8121b9831b04086d257f9af2363d5d2fec0dcd61 Mon Sep 17 00:00:00 2001 From: Pine Date: Wed, 2 Sep 2026 09:52:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(mini):=20PageHeader=E5=8D=A0=E4=BD=8D?= =?UTF-8?q?=E7=AC=A6=E9=BB=98=E8=AE=A4=E9=AB=98=E5=BA=A6=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E8=A2=AB=E9=81=AE=E6=8C=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PageHeader占位符初始高度从0改为navH+80 - 异步测量前内容不再被固定标题区遮挡 - 解决我的活动页发布按钮等被覆盖问题 --- miniprogram/src/components/TopInset.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/miniprogram/src/components/TopInset.jsx b/miniprogram/src/components/TopInset.jsx index d2c7328..bcabd31 100644 --- a/miniprogram/src/components/TopInset.jsx +++ b/miniprogram/src/components/TopInset.jsx @@ -32,7 +32,9 @@ export function PageHeader({ no, title, en, sub, back }) { // 标题区整体上移 65rpx:从状态栏让位空间中扣除(不是容器偏移,占位实测自动跟随,无空白) const SHIFT_PX = Math.round((65 * (windowWidth || 375)) / 750); const topPad = Math.max(navH - SHIFT_PX, 24); // 下限:至少给状态栏留 24px - const [h, setH] = useState(0); + // 默认占位高度 = 状态栏+导航区+标题内容,避免异步测量前内容被遮挡 + const defaultH = navH + 80; + const [h, setH] = useState(defaultH); useEffect(() => { Taro.nextTick(() => {