移除iOS根容器锁高以修复底部黑边

This commit is contained in:
JSR
2026-03-19 18:46:31 +08:00
parent 915ea55e73
commit 62c4855cc4
3 changed files with 3 additions and 16 deletions
+1 -1
View File
@@ -297,7 +297,7 @@ function MainContent(): React.JSX.Element {
}} }}
> >
{contextHolder} {contextHolder}
<Layout style={{ height: "100%", minHeight: "100dvh", flexDirection: "row", overflow: "hidden" }}> <Layout style={{ height: "100%", flexDirection: "row", overflow: "hidden" }}>
<Sidebar <Sidebar
activeMenu={activeMenu} activeMenu={activeMenu}
permission={permission} permission={permission}
+2 -6
View File
@@ -1,7 +1,6 @@
@import "antd/dist/reset.css"; @import "antd/dist/reset.css";
:root { :root {
--ss-app-height: 100dvh;
--ss-safe-area-top: env(safe-area-inset-top, 0px); --ss-safe-area-top: env(safe-area-inset-top, 0px);
--ss-safe-area-right: env(safe-area-inset-right, 0px); --ss-safe-area-right: env(safe-area-inset-right, 0px);
--ss-safe-area-bottom: env(safe-area-inset-bottom, 0px); --ss-safe-area-bottom: env(safe-area-inset-bottom, 0px);
@@ -18,7 +17,6 @@ html,
body, body,
#root { #root {
height: 100%; height: 100%;
min-height: var(--ss-app-height);
margin: 0; margin: 0;
padding: 0; padding: 0;
overflow: hidden; overflow: hidden;
@@ -30,10 +28,8 @@ body,
} }
#root { #root {
position: fixed; width: 100%;
inset: 0; min-height: 100%;
width: 100vw;
height: var(--ss-app-height);
padding-top: var(--ss-safe-area-top); padding-top: var(--ss-safe-area-top);
padding-right: var(--ss-safe-area-right); padding-right: var(--ss-safe-area-right);
padding-bottom: var(--ss-safe-area-bottom); padding-bottom: var(--ss-safe-area-bottom);
-9
View File
@@ -135,15 +135,6 @@ if (isMacDesktop) {
document.documentElement.classList.add("platform-macos") document.documentElement.classList.add("platform-macos")
} }
const setAppHeightVar = () => {
const appHeight = Math.max(window.innerHeight, 0)
document.documentElement.style.setProperty("--ss-app-height", `${appHeight}px`)
}
setAppHeightVar()
window.addEventListener("resize", setAppHeightVar)
window.addEventListener("orientationchange", setAppHeightVar)
window.addEventListener("pageshow", setAppHeightVar)
window.addEventListener("error", (e: any) => { window.addEventListener("error", (e: any) => {
const error = e?.error const error = e?.error
safeWriteLog({ safeWriteLog({