diff --git a/packages/frontend/src/App.vue b/packages/frontend/src/App.vue index 06c70da..a2c9d7e 100644 --- a/packages/frontend/src/App.vue +++ b/packages/frontend/src/App.vue @@ -44,8 +44,10 @@ const updateUnderline = async () => { if (navRef.value && underlineRef.value) { const activeLink = navRef.value.querySelector('.router-link-exact-active') as HTMLElement; if (activeLink) { + const offsetBottom = 2; // 下划线距离文字底部的距离 (px) underlineRef.value.style.left = `${activeLink.offsetLeft}px`; underlineRef.value.style.width = `${activeLink.offsetWidth}px`; + // underlineRef.value.style.top = `${activeLink.offsetTop + activeLink.offsetHeight + offsetBottom}px`; // 移除 top 设置 underlineRef.value.style.opacity = '1'; // Make it visible } else { underlineRef.value.style.opacity = '0'; // Hide if no active link (e.g., on login page if not a nav link) @@ -265,7 +267,7 @@ const isElementVisibleAndFocusable = (element: HTMLElement): boolean => { {{ t('nav.logout') }} -
+