style: polish admin layout visuals

- 顶栏改柔和阴影,Logo 区与侧栏连成一体(同宽+右边框)
- 侧栏菜单项圆角、主题色高亮、hover 过渡
- 内容区灰底衬白,footer 加顶边框,多页签激活态配色统一

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
liuyun 2026-10-11 00:40:11 +08:00
parent 66f4a38c98
commit 99650949c0
6 changed files with 66 additions and 10 deletions

View File

@ -31,6 +31,7 @@ withDefaults(
font-size: var(--wm-font-size-xs); font-size: var(--wm-font-size-xs);
color: var(--wm-color-text-secondary); color: var(--wm-color-text-secondary);
background: var(--wm-bg-color-base); background: var(--wm-bg-color-base);
border-top: 1px solid var(--wm-border-color-light);
} }
.ty-footer.is-fixed { .ty-footer.is-fixed {

View File

@ -155,7 +155,7 @@ function onUserCommand(command: string): void {
height: var(--ty-header-height, 56px); height: var(--ty-header-height, 56px);
padding: 0 12px 0 0; padding: 0 12px 0 0;
background: var(--wm-bg-color-base); background: var(--wm-bg-color-base);
border-bottom: 1px solid var(--wm-border-color-light); box-shadow: 0 1px 4px rgb(0 21 41 / 6%);
z-index: 100; z-index: 100;
&.is-fixed { &.is-fixed {
@ -175,6 +175,10 @@ function onUserCommand(command: string): void {
gap: 8px; gap: 8px;
flex-shrink: 0; flex-shrink: 0;
overflow: hidden; overflow: hidden;
height: var(--ty-header-height, 56px);
padding: 0 12px;
background: var(--wm-bg-color-base);
border-right: 1px solid var(--wm-border-color-light);
&.is-icon { &.is-icon {
justify-content: center; justify-content: center;
@ -183,14 +187,15 @@ function onUserCommand(command: string): void {
} }
&__logo-img { &__logo-img {
width: 32px; width: 30px;
height: 32px; height: 30px;
flex-shrink: 0; flex-shrink: 0;
} }
&__title { &__title {
font-size: var(--wm-font-size-lg); font-size: var(--wm-font-size-lg);
font-weight: var(--wm-font-weight-semibold); font-weight: var(--wm-font-weight-semibold);
letter-spacing: 0.5px;
color: var(--wm-color-text-primary); color: var(--wm-color-text-primary);
white-space: nowrap; white-space: nowrap;
} }
@ -199,14 +204,15 @@ function onUserCommand(command: string): void {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 32px; width: 34px;
height: 32px; height: 34px;
border: none; border: none;
border-radius: var(--wm-border-radius-base); border-radius: var(--wm-border-radius-base);
background: transparent; background: transparent;
font-size: 18px; font-size: 18px;
color: var(--wm-color-text-regular); color: var(--wm-color-text-regular);
cursor: pointer; cursor: pointer;
transition: background-color 0.2s, color 0.2s;
&:hover { &:hover {
background: var(--wm-bg-color-page); background: var(--wm-bg-color-page);
@ -216,7 +222,19 @@ function onUserCommand(command: string): void {
&__nav { &__nav {
border-bottom: none; border-bottom: none;
margin-left: 8px; margin-left: 4px;
:deep(.el-menu-item),
:deep(.el-sub-menu__title) {
height: var(--ty-header-height, 56px);
line-height: var(--ty-header-height, 56px);
color: var(--wm-color-text-regular);
}
:deep(.el-menu-item.is-active) {
color: var(--el-color-primary);
border-bottom-color: var(--el-color-primary);
}
:deep(.menu-icon) { :deep(.menu-icon) {
margin-right: 4px; margin-right: 4px;
@ -231,18 +249,22 @@ function onUserCommand(command: string): void {
&__right { &__right {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 4px; gap: 2px;
margin-left: auto; margin-left: auto;
} }
&__user { &__user {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 4px; gap: 6px;
padding: 0 8px; padding: 0 8px;
font-size: 16px; font-size: 16px;
color: var(--wm-color-text-regular); color: var(--wm-color-text-regular);
cursor: pointer; cursor: pointer;
&:hover {
color: var(--el-color-primary);
}
} }
} }
</style> </style>

View File

@ -82,6 +82,29 @@ function onSelect(index: string): void {
.el-menu { .el-menu {
border-right: none; border-right: none;
--el-menu-bg-color: transparent;
--el-menu-text-color: var(--wm-color-text-regular);
--el-menu-hover-bg-color: var(--wm-bg-color-page);
--el-menu-active-color: var(--el-color-primary);
:deep(.el-menu-item),
:deep(.el-sub-menu__title) {
height: 44px;
line-height: 44px;
margin: 2px 8px;
border-radius: var(--wm-border-radius-base);
}
:deep(.el-menu-item.is-active) {
background: var(--el-color-primary-light-9);
color: var(--el-color-primary);
font-weight: var(--wm-font-weight-medium);
}
:deep(.el-menu-item:hover),
:deep(.el-sub-menu__title:hover) {
background: var(--wm-bg-color-page);
}
} }
:deep(.menu-icon) { :deep(.menu-icon) {

View File

@ -41,11 +41,20 @@ function onTabRemove(name: string | number): void {
<style scoped lang="scss"> <style scoped lang="scss">
.ty-tabs { .ty-tabs {
--el-tabs-header-height: 36px; --el-tabs-header-height: 36px;
background: var(--wm-bg-color-base);
:deep(.el-tabs__header) { :deep(.el-tabs__header) {
margin: 0; margin: 0;
padding: 4px 8px 0; padding: 6px 8px 0;
background: var(--wm-bg-color-base); background: var(--wm-bg-color-base);
} }
:deep(.el-tabs__nav) {
border: none;
}
:deep(.el-tabs__item.is-active) {
color: var(--el-color-primary);
}
} }
</style> </style>

View File

@ -259,5 +259,6 @@ watch(
.app-main { .app-main {
flex: 1; flex: 1;
padding: 16px; padding: 16px;
background: var(--wm-bg-color-page);
} }
</style> </style>

File diff suppressed because one or more lines are too long