feat(web): 允许收起左侧菜单以让出内容宽度。

顶栏提供收起按钮,收起后侧栏宽度为 0,不再保留被挤压的图标条。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-11-05 09:39:47 +08:00
1 parent 8e9536332a
commit 13cf2e216d
9 files changed
+63 -7

No files matched your search

+6
View File
@@ -81,4 +81,10 @@
<style lang="scss" scoped>
@use './style' as layout-base;
@use './style.portal' as layout-portal;
/* 内层保持展开宽度,收起时由外层裁切,避免菜单被挤成图标条 */
#app-sidebar :deep(.layout-sidebar) {
width: var(--app-sidebar-open-width, 260px);
min-width: var(--app-sidebar-open-width, 260px);
}
</style>
+10 -1
View File
@@ -9,6 +9,8 @@
flex-shrink: 0;
width: var(--app-sidebar-open-width, 260px);
height: 100vh;
overflow: hidden;
transition: width 0.2s ease;
border-right: 1px solid var(--mint-border, #d9e8e2);
background: var(--mint-surface, #fff);
box-sizing: border-box;
@@ -27,7 +29,14 @@
}
&.is-collapsed {
width: var(--app-sidebar-close-width, 64px);
width: 0;
min-width: 0;
border-right-width: 0;
pointer-events: none;
&::after {
content: none;
}
}
}