fix(web-admin): 对齐门户顶栏 brand 与侧栏右边框,并修复侧栏竖线被遮挡

将侧栏右边框改画在 #app-sidebar 上,内部菜单改为宽度 100%,避免等宽子项盖住边框;顶栏 brand 宽度与侧栏展开宽度对齐。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-07-25 18:15:53 +08:00
1 parent 9b8131fa40
commit c756fbddfc
5 files changed
+32 -15

No files matched your search

@@ -196,7 +196,8 @@
maxWidth: width,
flexShrink: '0',
boxSizing: 'border-box',
borderRight: '1px solid var(--mint-border, #d9e8e2)'
// 门户:竖线由 #app-sidebar 绘制,避免被内部等宽 .menu-left 盖住
borderRight: isPortalMenu.value ? 'none' : '1px solid var(--mint-border, #d9e8e2)'
} as Record<string, string>
})
@@ -469,18 +470,18 @@
@use './theme';
.layout-sidebar {
// 侧栏容器宽度固定,内部菜单在容器内完整展示
// 侧栏容器宽度固定,内部菜单在容器内完整展示(用 100% 避免等宽子项盖住容器右边框)
.menu-left-open {
width: v-bind(menuopenwidth);
min-width: v-bind(menuopenwidth);
max-width: v-bind(menuopenwidth);
width: 100%;
min-width: 0;
max-width: 100%;
flex-shrink: 0;
}
.menu-left-close {
width: v-bind(menuclosewidth);
min-width: v-bind(menuclosewidth);
max-width: v-bind(menuclosewidth);
width: 100%;
min-width: 0;
max-width: 100%;
flex-shrink: 0;
}
@@ -494,7 +495,7 @@
// 折叠后宽度
.el-menu--collapse {
width: v-bind(menuclosewidth);
width: 100%;
}
}
</style>
@@ -90,7 +90,8 @@
justify-content: space-between;
width: 100%;
height: 56px;
padding: 0 var(--mint-content-padding, 24px);
/* 左侧无 padding:brand 区与侧栏同宽,右边框才能纵向对齐 */
padding: 0 var(--mint-content-padding, 24px) 0 0;
user-select: none;
background: var(--mint-primary, #1ca851);
border-bottom: 1px solid rgba(255, 255, 255, 0.12);
@@ -106,12 +107,18 @@
}
.portal-header-brand {
box-sizing: border-box;
display: flex;
flex-shrink: 0;
gap: 12px;
align-items: center;
margin-right: 4px;
/* +1px:与侧栏 #app-sidebar 外边框(内容宽 + 1px border)纵向对齐 */
width: calc(var(--app-sidebar-open-width, 270px) + 1px);
min-width: calc(var(--app-sidebar-open-width, 270px) + 1px);
max-width: calc(var(--app-sidebar-open-width, 270px) + 1px);
padding-left: var(--mint-content-padding, 24px);
padding-right: 16px;
overflow: hidden;
cursor: pointer;
border-right: 1px solid rgba(255, 255, 255, 0.22);
}
@@ -121,8 +128,11 @@
}
.portal-header-title {
max-width: 290px;
flex: 1;
min-width: 0;
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
font-size: 16px;
font-weight: 700;
line-height: 1.35;