fix: 恢复侧边栏原生收缩触发器

This commit is contained in:
2026-05-18 16:45:59 +08:00
parent 028d2d42cc
commit 31dd478240
3 changed files with 11 additions and 32 deletions
+7
View File
@@ -1,5 +1,12 @@
# 项目上下文记录
## 2026-05-18:恢复侧边栏原生收缩触发器
- `frontend/src/AppShell.vue` 移除顶部标题栏里的自定义汉堡收缩按钮,改用 Naive UI `n-layout-sider` 的 `show-trigger="bar"` 原生触发器。
- 侧边栏收缩状态仍写入 `localStorage.sidebarCollapsed`,刷新页面后保持用户上次的展开/收缩状态。
- `frontend/src/styles.css` 清理自定义 `.sidebar-toggle` 样式,避免顶部标题栏出现额外按钮。
- 已执行 `npm run build`,构建通过;未启动浏览器或 headless Chrome。
## 2026-05-18:修正折叠侧边栏菜单图标居中
- `frontend/src/styles.css` 的折叠侧边栏菜单项强制改为 flex 居中布局,避免 Naive Menu 折叠时透明文本列继续占据 grid 空间导致图标偏左。