From 0e64ca8083db45d6d58e16c617955de9025b7b7c Mon Sep 17 00:00:00 2001 From: JSR Date: Thu, 19 Mar 2026 20:15:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DiOS=E9=A6=96=E5=B8=A7?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E5=BA=95=E9=83=A8=E7=99=BD=E8=BE=B9=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/main.css | 12 ++++++++++++ src/main.tsx | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/src/assets/main.css b/src/assets/main.css index 189dd13..76bf2b3 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -20,6 +20,18 @@ } } +/* iOS WebView 首帧偶发 vh/dvh 计算偏小,优先使用 fill-available 防止底部白边 */ +html.platform-ios { + --ss-app-height: -webkit-fill-available; +} + +html.platform-ios, +html.platform-ios body, +html.platform-ios #root { + height: -webkit-fill-available; + min-height: -webkit-fill-available; +} + html, body, #root { diff --git a/src/main.tsx b/src/main.tsx index b7d4ac5..1a4ad95 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -135,6 +135,10 @@ if (isMacDesktop) { document.documentElement.classList.add("platform-macos") } +if (isIos) { + document.documentElement.classList.add("platform-ios") +} + window.addEventListener("error", (e: any) => { const error = e?.error safeWriteLog({