From 31e3ef284615f4b9ded024cf3c5c3962577ae87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=AB=E7=8C=ABguowen?= <9290821+guowen-the-cat@user.noreply.gitee.com> Date: Mon, 11 Aug 2025 16:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E9=A1=B6=E9=83=A8=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/styles/index.scss | 17 +++++++++++++++++ ruoyi-ui/src/layout/components/Navbar.vue | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/assets/styles/index.scss b/ruoyi-ui/src/assets/styles/index.scss index bb87292..240f7d4 100644 --- a/ruoyi-ui/src/assets/styles/index.scss +++ b/ruoyi-ui/src/assets/styles/index.scss @@ -176,3 +176,20 @@ aside { margin-bottom: 10px; } } + +// 固定导航栏 +.fixed-header { + position: fixed; + top: 0; + right: 0; + // left: 0; + width: 100%; + z-index: 999; + box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); +} + +// 调整内容区域位置(防止被导航栏遮挡) +.app-main { + padding-top: 50px; // 根据导航栏实际高度调整 + min-height: calc(100vh - 50px); // 保持高度正确 +} \ No newline at end of file diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 5e37e98..01b961b 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -1,5 +1,5 @@