mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 03:43:39 +00:00
Merge pull request #2839 from QuantumNous/fix/sidebar-scroll-dvh
🐛 fix: sidebar scroll on mobile dynamic viewport
This commit is contained in:
@@ -121,8 +121,8 @@ const PageLayout = () => {
|
||||
|
||||
return (
|
||||
<Layout
|
||||
className='app-layout'
|
||||
style={{
|
||||
height: '100vh',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
overflow: isMobile ? 'visible' : 'hidden',
|
||||
@@ -153,6 +153,7 @@ const PageLayout = () => {
|
||||
>
|
||||
{showSider && (
|
||||
<Sider
|
||||
className='app-sider'
|
||||
style={{
|
||||
position: 'fixed',
|
||||
left: 0,
|
||||
@@ -160,7 +161,6 @@ const PageLayout = () => {
|
||||
zIndex: 99,
|
||||
border: 'none',
|
||||
paddingRight: '0',
|
||||
height: 'calc(100vh - 64px)',
|
||||
width: 'var(--sidebar-current-width)',
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -31,6 +31,16 @@ body {
|
||||
background-color: var(--semi-color-bg-0);
|
||||
}
|
||||
|
||||
.app-layout {
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
}
|
||||
|
||||
.app-sider {
|
||||
height: calc(100vh - 64px);
|
||||
height: calc(100dvh - 64px);
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||
monospace;
|
||||
@@ -107,6 +117,7 @@ code {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
transition: width 0.3s ease;
|
||||
background: var(--semi-color-bg-0);
|
||||
}
|
||||
@@ -116,9 +127,11 @@ code {
|
||||
width: 100%;
|
||||
background: var(--semi-color-bg-0);
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
overflow-x: hidden;
|
||||
border-right: none;
|
||||
overflow-y: auto;
|
||||
min-height: 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user