Skip to content

Commit 5085f56

Browse files
committed
fix: 移除手机端进入沉浸模式按钮
1 parent 56c2a46 commit 5085f56

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ function MainContent(): React.JSX.Element {
353353

354354
const isDark = currentTheme?.mode === "dark"
355355
const brandColor = currentTheme?.config?.tdesign?.brandColor || "#0052D9"
356+
const isMobileDevice = isIosDevice || isAndroidDevice
356357
const showMobileBottomNav = isPortraitMode && !immersiveMode
357358

358359
return (
@@ -395,6 +396,7 @@ function MainContent(): React.JSX.Element {
395396
onLogout={logout}
396397
showWindowControls={!isIosDevice && !isAndroidDevice}
397398
isPortraitMode={isPortraitMode}
399+
isMobileDevice={isMobileDevice}
398400
sidebarCollapsed={sidebarCollapsed}
399401
floatingExpand={isPortraitMode}
400402
floatingExpanded={floatingSidebarExpanded}

src/components/ContentArea.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ interface ContentAreaProps {
6060
onLogout: () => void
6161
showWindowControls: boolean
6262
isPortraitMode: boolean
63+
isMobileDevice: boolean
6364
sidebarCollapsed: boolean
6465
floatingExpand: boolean
6566
floatingExpanded: boolean
@@ -78,6 +79,7 @@ export function ContentArea({
7879
onLogout,
7980
showWindowControls,
8081
isPortraitMode,
82+
isMobileDevice,
8183
sidebarCollapsed,
8284
floatingExpand,
8385
floatingExpanded,
@@ -228,7 +230,7 @@ export function ContentArea({
228230
}
229231
>
230232
<Space size="small">
231-
{(immersiveMode || isHomePage) && (
233+
{(immersiveMode || (isHomePage && !isMobileDevice)) && (
232234
<Button
233235
size="small"
234236
type={immersiveMode ? "primary" : "default"}

0 commit comments

Comments
 (0)