refactor: Improve mobile responsiveness and scrolling behavior in UI layout

This commit is contained in:
1808837298@qq.com
2025-03-10 15:49:32 +08:00
parent d9cf0885f1
commit b2938ffe2c
3 changed files with 32 additions and 16 deletions

View File

@@ -84,7 +84,11 @@ const PageLayout = () => {
}}>
<HeaderBar />
</Header>
<Layout style={{ marginTop: '56px', height: 'calc(100vh - 56px)', overflow: 'hidden' }}>
<Layout style={{
marginTop: '56px',
height: 'calc(100vh - 56px)',
overflow: styleState.isMobile ? 'auto' : 'hidden'
}}>
{styleState.showSider && (
<Sider style={{
height: 'calc(100vh - 56px)',
@@ -105,13 +109,17 @@ const PageLayout = () => {
)}
<Layout style={{
marginLeft: styleState.showSider ? (isSidebarCollapsed ? '60px' : '200px') : '0',
transition: 'margin-left 0.3s ease'
transition: 'margin-left 0.3s ease',
height: '100%',
overflow: 'auto'
}}>
<Content
style={{
height: '100%',
overflowY: 'auto',
padding: styleState.shouldInnerPadding? '24px': '0'
WebkitOverflowScrolling: 'touch',
padding: styleState.shouldInnerPadding? '24px': '0',
position: 'relative'
}}
>
<App />