fix(layout): 🐛 修复 TopLayout 顶部横向菜单提前省略

TopLayout 顶部菜单仅渲染顶级可见路由(避免全量路由树导致 scrollWidth 过大)
顶部 header 拆分 logo/menu 容器并补齐 flex + min-width:0,确保横向菜单占满剩余宽度
common.scss 补充 Top/Mix 横向 el-menu 的全局 flex 规则,省略仅在真实溢出时触发

ISSUES has been processed #IDKBWO
This commit is contained in:
Ray.Hao
2026-01-18 09:36:40 +08:00
parent d172206d71
commit 102b95e288
2 changed files with 85 additions and 42 deletions

View File

@@ -37,6 +37,17 @@ html.sidebar-color-blue .layout-mix .layout__sidebar--left .el-menu {
}
}
/* Top layout: let horizontal menu fill the remaining header space */
.layout-top .layout__header-left .el-menu--horizontal,
.layout-mix .layout__header-menu .el-menu--horizontal {
display: flex;
flex: 1 1 0% !important;
align-items: center;
width: 100% !important;
min-width: 0 !important;
overflow: hidden;
}
/* 窄屏隐藏菜单文字,仅保留图标 */
.hideSidebar {
&.layout-top .layout__header .el-menu--horizontal,