Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
new-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
78cc82dc
authored
Mar 11, 2025
by
1808837298@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Improve mobile layout and scrolling behavior
parent
dbcbe3ff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
+25
-9
web/src/components/Footer.js
+1
-1
web/src/components/PageLayout.js
+7
-6
web/src/index.css
+17
-2
No files found.
web/src/components/Footer.js
View file @
78cc82dc
...
...
@@ -61,7 +61,7 @@ const FooterBar = () => {
return
(
<
div
style
=
{{
textAlign
:
'center'
,
paddingBottom
:
styleState
?.
isMobile
?
'112px'
:
'5px'
,
paddingBottom
:
'5px'
,
}}
>
{
footer
?
(
<
div
...
...
web/src/components/PageLayout.js
View file @
78cc82dc
...
...
@@ -75,13 +75,13 @@ const PageLayout = () => {
height
:
'100vh'
,
display
:
'flex'
,
flexDirection
:
'column'
,
overflow
:
'hidden'
overflow
:
styleState
.
isMobile
?
'visible'
:
'hidden'
}}
>
<
Header
style
=
{{
padding
:
0
,
height
:
'auto'
,
lineHeight
:
'normal'
,
position
:
'fixed'
,
position
:
styleState
.
isMobile
?
'sticky'
:
'fixed'
,
width
:
'100%'
,
top
:
0
,
zIndex
:
100
,
...
...
@@ -90,9 +90,9 @@ const PageLayout = () => {
<
HeaderBar
/>
<
/Header
>
<
Layout
style
=
{{
marginTop
:
'56px'
,
height
:
'calc(100vh - 56px)'
,
overflow
:
'auto'
,
marginTop
:
styleState
.
isMobile
?
'0'
:
'56px'
,
height
:
styleState
.
isMobile
?
'auto'
:
'calc(100vh - 56px)'
,
overflow
:
styleState
.
isMobile
?
'visible'
:
'auto'
,
display
:
'flex'
,
flexDirection
:
'column'
}}
>
...
...
@@ -121,10 +121,11 @@ const PageLayout = () => {
<
Content
style
=
{{
flex
:
'1 0 auto'
,
overflowY
:
'auto'
,
overflowY
:
styleState
.
isMobile
?
'visible'
:
'auto'
,
WebkitOverflowScrolling
:
'touch'
,
padding
:
styleState
.
shouldInnerPadding
?
'24px'
:
'0'
,
position
:
'relative'
,
marginTop
:
styleState
.
isMobile
?
'2px'
:
'0'
,
}}
>
<
App
/>
...
...
web/src/index.css
View file @
78cc82dc
body
{
margin
:
0
;
padding-top
:
0
;
overflow
:
hidden
;
font-family
:
Lato
,
'Helvetica Neue'
,
Arial
,
Helvetica
,
'Microsoft YaHei'
,
sans-serif
;
-webkit-font-smoothing
:
antialiased
;
...
...
@@ -13,7 +12,8 @@ body {
}
#root
{
height
:
100vh
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
overflow
:
hidden
;
}
...
...
@@ -86,6 +86,21 @@ body {
/* 确保移动端内容可滚动 */
.semi-layout-content
{
-webkit-overflow-scrolling
:
touch
!important
;
overscroll-behavior-y
:
auto
!important
;
}
/* 修复移动端下拉刷新 */
body
{
overflow
:
visible
!important
;
overscroll-behavior-y
:
auto
!important
;
position
:
static
!important
;
height
:
100%
!important
;
}
/* 确保内容区域在移动端可以正常滚动 */
#root
{
overflow
:
visible
!important
;
height
:
100%
!important
;
}
/* 隐藏在移动设备上 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment