feat: 顶部导航滚动固定在最顶部
- 顶部导航行改 position:sticky, 页面滚动时固定视口最顶 - top:-26px 抵消滚动容器26px padding内缩实现贴顶(0位置); 通栏负边距+主题背景遮挡滚动内容 - 背景v-bind themeVars.bodyColor, 亮/暗色自动同步 验证: 滚动0/400/2000导航均top=0, 内容不露出, 暗色背景同步 CHANGELOG记录
This commit is contained in:
1 parent
f3944bbf39
commit
a2c4ac0ff1
2 files changed
+21
-1
No files matched your search
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
|
||||
## Version 2026.10.12-it-tools-pro
|
||||
|
||||
### 📌 顶部导航滚动固定
|
||||
- 顶部导航行(菜单/主页/搜索/语言/用户/授权应用)改为 `position:sticky`,页面滚动时固定在视口最顶部
|
||||
- `top:-26px` 抵消滚动容器 26px padding 内缩,实现真正贴顶(0 位置);通栏负边距 + 主题背景遮挡滚动内容
|
||||
- 背景绑定主题色,亮/暗色模式自动同步;验证滚动 0/400/2000 导航均停在 top=0、内容不从上方露出
|
||||
|
||||
|
||||
### 📄 修复:文档翻译打开就转圈、挡住了上传
|
||||
- 根因:文档面板的加载 spinner 是 `position:absolute; inset:0` 覆盖整个面板的空 n-spin,即使 `show=false` 仍渲染转圈元素且 `pointer-events:auto`,既显示幽灵转圈又拦截上传框点击
|
||||
- 修复:spinner 改为 `v-if="docLoading"`(不加载时彻底移除 DOM)+ `pointer-events:none`(加载中也不拦截点击)
|
||||
|
||||
@@ -88,7 +88,7 @@ const tools = computed<ToolCategory[]>(() => [
|
||||
</template>
|
||||
|
||||
<template #content>
|
||||
<div flex items-center justify-center gap-2>
|
||||
<div class="top-nav" flex items-center justify-center gap-2>
|
||||
<c-button
|
||||
circle
|
||||
variant="text"
|
||||
@@ -170,6 +170,20 @@ const tools = computed<ToolCategory[]>(() => [
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
// 顶部导航:滚动时固定在最顶部(sticky),通栏贴顶遮挡滚动内容
|
||||
.top-nav {
|
||||
position: sticky;
|
||||
// -26px 抵消滚动容器 padding-top 内缩,使导航真正贴到视口最顶(0)
|
||||
top: -26px;
|
||||
z-index: 200;
|
||||
// 通栏:抵消滚动容器的 26px padding
|
||||
margin: -26px -26px 0 -26px;
|
||||
padding: 12px 26px;
|
||||
background: v-bind('themeVars.bodyColor');
|
||||
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sider-content {
|
||||
padding-top: 160px;
|
||||
padding-bottom: 200px;
|
||||
|
||||
Reference in new issue
Block a user