diff --git a/src/styles/globals.css b/src/styles/globals.css index dc61b04..a20d86f 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -67,8 +67,10 @@ input, textarea, select { font: inherit; } to { opacity: 1; transform: translateY(0); } } -/* 带有 antd-mobile NavBar 的页面 (Home/Monitor/Me/Article) */ -.page-with-navbar { display: flex; flex-direction: column; min-height: 100%; } +/* 带有 antd-mobile NavBar 的页面 (Home/Monitor/Macro/Article) */ +/* height:100% 让页面占满 app-main 高度, 内部 tab-content 独立滚动, + 头部 NavBar 与分类 tab 固定在顶部不上滚 */ +.page-with-navbar { display: flex; flex-direction: column; height: 100%; min-height: 0; } .page-with-navbar .adm-error-block { flex: 1; } /* 底部 antd-mobile TabBar 定位 */ @@ -92,7 +94,7 @@ input, textarea, select { font: inherit; } .swipe-tabs-wrap { display: flex; flex-direction: column; - height: 100%; + flex: 1 1 auto; min-height: 0; } .tab-content { @@ -209,7 +211,7 @@ input, textarea, select { font: inherit; } .me-logout { color: var(--color-danger); } .me-version { text-align: center; font-size: 12px; color: var(--color-muted); padding: 18px 0 8px; } /* 首页模块: 报警 + 新闻 */ -.home-content { padding: 0 0 16px; } +.home-content { padding: 0 0 16px; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; } .home-content .adm-tabs-content { --content-padding: 0; } .home-content .tab-label { display: inline-flex; align-items: center; gap: 4px; } .home-section { padding: 0 12px 16px; } @@ -238,7 +240,7 @@ input, textarea, select { font: inherit; } .news-content { font-size: 15px; line-height: 1.75; color: #333; white-space: pre-wrap; word-break: break-word; } .news-content-empty { margin-top: 12px; font-size: 12px; color: var(--color-muted); } /* ================== 监控页 ================== */ -.monitor-content { padding: 0 0 16px; } +.monitor-content { padding: 0 0 16px; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; } .monitor-content .adm-tabs-content { --content-padding: 0; } .monitor-tip { font-size: 11px; color: var(--color-muted); padding: 8px 14px 2px; } .monitor-loading { padding: 40px 0; text-align: center; color: var(--color-muted); font-size: 13px; }