This commit is contained in:
zlwu committed 2026-05-26 19:04:27 +08:00
1 parent 4a00f21bfb
commit edf88dc016
1503 files changed
+329728 -41987

No files matched your search

@@ -21,7 +21,7 @@
<template #default>
<div class="pt-3">
<div class="flex-c pb-1 px-0">
<el-avatar :size="40" :src="avatarDisplayUrl" style="margin-right: 12px;">
<el-avatar :size="40" :src="avatarDisplayUrl" style="margin-right: 12px">
{{ userInfo.realName?.charAt(0) || userInfo.username?.charAt(0) || '管' }}
</el-avatar>
<div class="w-[calc(100%-60px)] h-full">
@@ -110,57 +110,57 @@
</script>
<style scoped lang="scss">
.user-avatar-wrapper {
cursor: pointer;
margin-right: 5px;
background-color: #fff;
border-radius: 50%;
padding: 2px;
.user-avatar-wrapper {
cursor: pointer;
margin-right: 5px;
background-color: #fff;
border-radius: 50%;
padding: 2px;
&:hover {
opacity: 0.8;
}
}
.btn-item {
display: flex;
align-items: center;
padding: 8px;
margin-bottom: 12px;
border-radius: 6px;
cursor: pointer;
user-select: none;
transition: background-color 0.2s;
span {
font-size: 14px;
&:hover {
opacity: 0.8;
}
}
.art-svg-icon {
margin-right: 8px;
font-size: 16px;
.btn-item {
display: flex;
align-items: center;
padding: 8px;
margin-bottom: 12px;
border-radius: 6px;
cursor: pointer;
user-select: none;
transition: background-color 0.2s;
span {
font-size: 14px;
}
.art-svg-icon {
margin-right: 8px;
font-size: 16px;
}
&:hover {
background-color: var(--art-gray-200);
}
&:last-child {
margin-bottom: 0;
}
}
&:hover {
background-color: var(--art-gray-200);
}
.log-out {
padding: 6px;
margin-top: 20px;
text-align: center;
font-size: 12px;
border: 1px solid var(--art-gray-400);
border-radius: 6px;
transition: all 0.2s;
&:last-child {
margin-bottom: 0;
&:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
}
}
.log-out {
padding: 6px;
margin-top: 20px;
text-align: center;
font-size: 12px;
border: 1px solid var(--art-gray-400);
border-radius: 6px;
transition: all 0.2s;
&:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
}
</style>
@@ -60,11 +60,7 @@
</ul>
</ElScrollbar>
<ArtIconButton
class="switch-btn size-10"
icon="sort"
@click="toggleDualMenuMode"
/>
<ArtIconButton class="switch-btn size-10" icon="sort" @click="toggleDualMenuMode" />
</div>
<!-- 左侧菜单 || 双列菜单(右侧) -->
@@ -119,10 +115,7 @@
<!-- 双列菜单右侧折叠按钮 -->
<div class="dual-menu-collapse-btn" v-if="isDualMenu" @click="toggleMenuVisibility">
<ArtSvgIcon
class="text-g-500/70"
:icon="menuOpen ? 'arrow-left' : 'arrow-right'"
/>
<ArtSvgIcon class="text-g-500/70" :icon="menuOpen ? 'arrow-left' : 'arrow-right'" />
</div>
<div
@@ -443,9 +436,21 @@
@use './theme';
.layout-sidebar {
// 展开的宽度
.el-menu:not(.el-menu--collapse) {
// 侧栏容器宽度固定,内部菜单可横向滚动
.menu-left-open {
width: v-bind(menuopenwidth);
flex-shrink: 0;
}
.menu-left-close {
width: v-bind(menuclosewidth);
flex-shrink: 0;
}
// 展开的宽度:侧栏容器固定,菜单内容可随长标题撑开并横向滚动
.el-menu:not(.el-menu--collapse) {
width: max-content;
min-width: v-bind(menuopenwidth);
}
// 折叠后宽度
@@ -99,8 +99,23 @@
position: relative;
box-sizing: border-box;
height: 100vh;
overflow: hidden;
background: var(--mint-surface, #fff);
// 长菜单名完整展示:侧栏宽度不变,内容区可横向滚动
:deep(.el-scrollbar__wrap) {
overflow-x: auto !important;
}
:deep(.el-scrollbar__view) {
width: max-content;
min-width: 100%;
}
:deep(.el-scrollbar__bar.is-horizontal) {
height: 4px;
}
@media only screen and (width <= 640px) {
height: 100dvh;
}
@@ -10,9 +10,10 @@ $popup-menu-padding: 8px;
$popup-menu-margin: 5px;
$popup-menu-radius: 6px;
// 通用菜单项样式
// 通用菜单项样式(min-width 保证短标题仍铺满侧栏;width: max-content 允许长标题撑开以配合横向滚动)
@mixin menu-item-base {
width: calc(100% - 12px);
width: max-content;
min-width: calc(100% - 12px);
margin-left: 6px;
border-radius: 8px;
@@ -143,8 +144,10 @@ $popup-menu-radius: 6px;
height: $menu-height !important;
margin-bottom: 2px;
line-height: $menu-height !important;
overflow: visible !important;
span {
.menu-name {
flex-shrink: 0;
font-size: $menu-font-size !important;
font-weight: 500;
// Fresh Mint:默认菜单项为中性色(demo `.nav a`)
@@ -152,8 +155,7 @@ $popup-menu-radius: 6px;
text-rendering: geometricprecision;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@include ellipsis();
white-space: nowrap;
}
}