mirror of
https://github.com/kuaifan/dootask.git
synced 2026-10-29 22:10:42 +00:00
feat(dashboard): 移动端仪表盘启用沉浸状态栏,滚动内容可穿过状态栏
This commit is contained in:
parent
571417f689
commit
02ebbc1c96
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="app" class="app-view">
|
||||
<div id="app" class="app-view" :class="{'immersive-status': immersiveStatus}">
|
||||
<!--顶部状态栏-->
|
||||
<div class="child-status-bar"></div>
|
||||
|
||||
@ -72,6 +72,13 @@
|
||||
background-color: var(--status-bar-color);
|
||||
}
|
||||
|
||||
// 沉浸状态栏:隐藏占位,页面内容延伸到状态栏下方
|
||||
&.immersive-status {
|
||||
.child-status-bar {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.child-navigation-bar {
|
||||
flex-shrink: 0;
|
||||
height: var(--navigation-bar-height);
|
||||
@ -171,6 +178,14 @@ export default {
|
||||
return null
|
||||
},
|
||||
|
||||
/**
|
||||
* 移动端仪表盘使用沉浸状态栏,滚动内容可穿过状态栏
|
||||
* @returns {boolean}
|
||||
*/
|
||||
immersiveStatus({routeName, windowPortrait}) {
|
||||
return windowPortrait && routeName === 'manage-dashboard'
|
||||
},
|
||||
|
||||
navigationColor({routeName, windowLandscape, mobileTabbar}) {
|
||||
if (!routeName) {
|
||||
return null
|
||||
|
||||
12
resources/assets/sass/pages/page-dashboard.scss
vendored
12
resources/assets/sass/pages/page-dashboard.scss
vendored
@ -1922,8 +1922,18 @@
|
||||
// ==================== 竖屏适配 ====================
|
||||
body.window-portrait {
|
||||
.page-dashboard {
|
||||
// 沉浸状态栏:滚动区域从屏幕顶部开始,内容让出状态栏高度(见 App.vue immersiveStatus)
|
||||
.dashboard-warning {
|
||||
top: var(--status-bar-height);
|
||||
margin-top: var(--status-bar-height);
|
||||
}
|
||||
|
||||
.dashboard-warning + .dashboard-body {
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.dashboard-body {
|
||||
padding: 16px 12px 24px;
|
||||
padding: calc(var(--status-bar-height) + 16px) 12px 24px;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user