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(() => {