Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KiangWuHospital
web
Commits
f51a30c8
Commit
f51a30c8
authored
Oct 26, 2026
by
James Yuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 大屏左右业务栏固定为 350px
避免随视口百分比缩放导致侧栏过宽或过窄,保持布局稳定。 Co-authored-by: Cursor <cursoragent@cursor.com>
parent
aa90aa3c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
14 deletions
+10
-14
web/src/components/scene/SceneViewport.vue
+2
-2
web/src/composables/useStageScale.ts
+2
-3
web/src/layouts/ScreenLayout.vue
+3
-3
web/src/styles/screen.css
+2
-2
web/src/views/overview/OverviewView.vue
+1
-4
No files found.
web/src/components/scene/SceneViewport.vue
View file @
f51a30c8
...
@@ -924,7 +924,7 @@ onBeforeUnmount(() => {
...
@@ -924,7 +924,7 @@ onBeforeUnmount(() => {
position
:
absolute
;
position
:
absolute
;
z
-
index
:
8
;
z
-
index
:
8
;
/* 贴在右侧业务面板内侧,对应原 screen-nav--side 占位 */
/* 贴在右侧业务面板内侧,对应原 screen-nav--side 占位 */
right
:
calc
(
var
(
--
screen
-
side
-
w
,
24
vw
)
+
16
px
);
right
:
calc
(
var
(
--
screen
-
side
-
w
,
350
px
)
+
16
px
);
top
:
50
%
;
top
:
50
%
;
transform
:
translateY
(
-
50
%
);
transform
:
translateY
(
-
50
%
);
display
:
flex
;
display
:
flex
;
...
@@ -981,7 +981,7 @@ onBeforeUnmount(() => {
...
@@ -981,7 +981,7 @@ onBeforeUnmount(() => {
flex
-
direction
:
row
;
flex
-
direction
:
row
;
align
-
items
:
center
;
align
-
items
:
center
;
gap
:
4
px
;
gap
:
4
px
;
max
-
width
:
calc
(
100
vw
-
2
*
var
(
--
screen
-
side
-
w
,
clamp
(
280
px
,
24
vw
,
480
px
)
)
-
36
px
);
max
-
width
:
calc
(
100
vw
-
2
*
var
(
--
screen
-
side
-
w
,
350
px
)
-
36
px
);
overflow
-
x
:
auto
;
overflow
-
x
:
auto
;
pointer
-
events
:
auto
;
pointer
-
events
:
auto
;
}
}
...
...
web/src/composables/useStageScale.ts
View file @
f51a30c8
...
@@ -17,9 +17,8 @@ export function useStageScale() {
...
@@ -17,9 +17,8 @@ export function useStageScale() {
function
fit
()
{
function
fit
()
{
const
w
=
window
.
innerWidth
const
w
=
window
.
innerWidth
// 窄屏收窄侧栏,宽屏不超过 480
// 左右面板固定 350px
const
side
=
Math
.
round
(
Math
.
min
(
480
,
Math
.
max
(
280
,
w
*
0.24
)))
document
.
documentElement
.
style
.
setProperty
(
'--screen-side-w'
,
'350px'
)
document
.
documentElement
.
style
.
setProperty
(
'--screen-side-w'
,
`
${
side
}
px`
)
document
.
documentElement
.
style
.
setProperty
(
'--screen-vw'
,
`
${
w
}
px`
)
document
.
documentElement
.
style
.
setProperty
(
'--screen-vw'
,
`
${
w
}
px`
)
document
.
documentElement
.
style
.
setProperty
(
'--screen-vh'
,
`
${
window
.
innerHeight
}
px`
)
document
.
documentElement
.
style
.
setProperty
(
'--screen-vh'
,
`
${
window
.
innerHeight
}
px`
)
}
}
...
...
web/src/layouts/ScreenLayout.vue
View file @
f51a30c8
...
@@ -233,7 +233,7 @@ function goAdmin() {
...
@@ -233,7 +233,7 @@ function goAdmin() {
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
bottom
:
0
;
bottom
:
0
;
width
:
calc
(
var
(
--screen-side-w
,
24vw
)
+
40px
);
width
:
calc
(
var
(
--screen-side-w
,
350px
)
+
40px
);
background
:
linear-gradient
(
background
:
linear-gradient
(
90deg
,
90deg
,
rgba
(
0
,
8
,
22
,
0.82
)
0%
,
rgba
(
0
,
8
,
22
,
0.82
)
0%
,
...
@@ -245,7 +245,7 @@ function goAdmin() {
...
@@ -245,7 +245,7 @@ function goAdmin() {
right
:
0
;
right
:
0
;
top
:
0
;
top
:
0
;
bottom
:
0
;
bottom
:
0
;
width
:
calc
(
var
(
--screen-side-w
,
24vw
)
+
40px
);
width
:
calc
(
var
(
--screen-side-w
,
350px
)
+
40px
);
background
:
linear-gradient
(
background
:
linear-gradient
(
270deg
,
270deg
,
rgba
(
0
,
8
,
22
,
0.82
)
0%
,
rgba
(
0
,
8
,
22
,
0.82
)
0%
,
...
@@ -286,7 +286,7 @@ function goAdmin() {
...
@@ -286,7 +286,7 @@ function goAdmin() {
/* 避开顶栏 + 中间翻牌器;贴在右侧面板内侧 */
/* 避开顶栏 + 中间翻牌器;贴在右侧面板内侧 */
top
:
clamp
(
200px
,
26vh
,
280px
);
top
:
clamp
(
200px
,
26vh
,
280px
);
bottom
:
clamp
(
56px
,
8vh
,
88px
);
bottom
:
clamp
(
56px
,
8vh
,
88px
);
right
:
calc
(
var
(
--screen-side-w
,
24vw
)
+
28px
);
right
:
calc
(
var
(
--screen-side-w
,
350px
)
+
28px
);
width
:
clamp
(
88px
,
6vw
,
108px
);
width
:
clamp
(
88px
,
6vw
,
108px
);
height
:
auto
!important
;
height
:
auto
!important
;
flex
:
none
!important
;
flex
:
none
!important
;
...
...
web/src/styles/screen.css
View file @
f51a30c8
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
background
:
#00060f
;
background
:
#00060f
;
color
:
var
(
--text
);
color
:
var
(
--text
);
font-family
:
var
(
--body-font
);
font-family
:
var
(
--body-font
);
/* 左右业务栏宽度
,随视口由 useStageScale 更新
*/
/* 左右业务栏宽度
(固定 350px)
*/
--screen-side-w
:
clamp
(
280px
,
24vw
,
480px
)
;
--screen-side-w
:
350px
;
}
}
.stage
::before
{
.stage
::before
{
content
:
none
;
content
:
none
;
...
...
web/src/views/overview/OverviewView.vue
View file @
f51a30c8
...
@@ -374,10 +374,7 @@ const energyDigits = computed(() => digits.value)
...
@@ -374,10 +374,7 @@ const energyDigits = computed(() => digits.value)
height
:
100
%
;
height
:
100
%
;
min
-
height
:
0
;
min
-
height
:
0
;
display
:
grid
;
display
:
grid
;
grid
-
template
-
columns
:
var
(
--
screen
-
side
-
w
,
clamp
(
280
px
,
24
vw
,
480
px
))
minmax
(
0
,
1
fr
)
var
(
grid
-
template
-
columns
:
var
(
--
screen
-
side
-
w
,
350
px
)
minmax
(
0
,
1
fr
)
var
(
--
screen
-
side
-
w
,
350
px
);
--
screen
-
side
-
w
,
clamp
(
280
px
,
24
vw
,
480
px
)
);
grid
-
template
-
rows
:
auto
1
fr
;
grid
-
template
-
rows
:
auto
1
fr
;
gap
:
10
px
12
px
;
gap
:
10
px
12
px
;
pointer
-
events
:
none
;
pointer
-
events
:
none
;
...
...
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