From 8bf8de7d841e232bb9da5f44730c951b0d7f3aaa Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 20 五月 2026 14:30:41 +0800
Subject: [PATCH] 进销存pro 1.菜单栏折叠后样式优化
---
src/assets/styles/sidebar.scss | 100 ++++++++++++++++++++++++++++++++++++++++++++------
src/assets/styles/variables.module.scss | 4 +-
2 files changed, 90 insertions(+), 14 deletions(-)
diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss
index 2248431..685a0eb 100644
--- a/src/assets/styles/sidebar.scss
+++ b/src/assets/styles/sidebar.scss
@@ -22,7 +22,7 @@
overflow: hidden;
padding: 0;
font-size: 0;
- background: linear-gradient(180deg, #123b63 0%, #153f69 48%, #0f2d4f 100%);
+ background: var(--sidebar-bg);
border-right: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 8px 0 24px rgba(15, 23, 42, 0.08);
isolation: isolate;
@@ -417,25 +417,101 @@
> .el-menu--popup {
max-height: 100vh;
- overflow-y: auto;
+ overflow: hidden;
padding: 10px;
border-radius: 14px;
- border: 1px solid rgba(163, 194, 236, 0.26);
- box-shadow: var(--shadow-md);
- background: rgba(16, 49, 89, 0.96);
+ position: relative;
+ isolation: isolate;
+ border: 1px solid rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.26);
+ box-shadow:
+ 0 18px 40px rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.16),
+ var(--shadow-md);
+ background: var(--sidebar-bg);
backdrop-filter: blur(16px);
- &::-webkit-scrollbar-track-piece {
- background: var(--surface-muted);
+ &::before {
+ content: "";
+ position: absolute;
+ inset: -28% -52% -18% -38%;
+ z-index: 0;
+ pointer-events: none;
+ background:
+ radial-gradient(circle at 9% 12%, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.62), transparent 44%),
+ radial-gradient(circle at 87% 18%, rgba(56, 189, 248, 0.4), transparent 48%),
+ radial-gradient(circle at 20% 82%, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.3), transparent 43%),
+ radial-gradient(circle at 66% 62%, rgba(125, 211, 252, 0.24), transparent 50%),
+ conic-gradient(
+ from 210deg at 58% 38%,
+ rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.14) 0deg,
+ rgba(56, 189, 248, 0.05) 76deg,
+ rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.16) 180deg,
+ rgba(125, 211, 252, 0.04) 290deg,
+ rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.14) 360deg
+ );
+ filter: blur(7px) saturate(1.24) contrast(1.05);
+ opacity: 0.96;
+ transform: translate3d(0, 0, 0);
+ transform-origin: 44% 58%;
+ animation:
+ sidebarAuroraDrift 17.9s cubic-bezier(0.31, 0.03, 0.18, 0.99) infinite,
+ sidebarAuroraBreath 9.7s ease-in-out infinite,
+ sidebarAuroraSkew 6.9s steps(23, end) infinite;
}
- &::-webkit-scrollbar {
- width: 5px;
+ &::after {
+ content: "";
+ position: absolute;
+ inset: 0;
+ z-index: 0;
+ pointer-events: none;
+ background:
+ linear-gradient(
+ 108deg,
+ transparent 10%,
+ rgba(255, 255, 255, 0.17) 34%,
+ rgba(255, 255, 255, 0.04) 48%,
+ transparent 72%
+ ),
+ linear-gradient(
+ 202deg,
+ rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.24) 0%,
+ transparent 34%,
+ rgba(56, 189, 248, 0.18) 66%,
+ transparent 100%
+ ),
+ radial-gradient(circle at 74% 12%, rgba(125, 211, 252, 0.25), transparent 50%),
+ radial-gradient(circle at 22% 84%, rgba(var(--el-color-primary-rgb, 37, 99, 235), 0.14), transparent 56%);
+ background-size: 236% 100%, 186% 186%, 164% 164%, 180% 180%;
+ background-position: 224% 0, 14% 16%, 78% 10%, 18% 82%;
+ opacity: 0.52;
+ transform: translate3d(0, 0, 0);
+ animation:
+ sidebarSheenSweep 13.1s linear infinite,
+ sidebarSheenJitter 4.7s steps(31, end) infinite;
}
- &::-webkit-scrollbar-thumb {
- background: var(--accent-light);
- border-radius: 10px;
+ > * {
+ position: relative;
+ z-index: 1;
+ }
+
+ > .el-menu {
+ max-height: calc(100vh - 20px);
+ overflow-y: auto;
+ overflow-x: hidden;
+
+ &::-webkit-scrollbar-track-piece {
+ background: var(--surface-muted);
+ }
+
+ &::-webkit-scrollbar {
+ width: 5px;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: var(--accent-light);
+ border-radius: 10px;
+ }
}
}
}
diff --git a/src/assets/styles/variables.module.scss b/src/assets/styles/variables.module.scss
index baa53d5..461b545 100644
--- a/src/assets/styles/variables.module.scss
+++ b/src/assets/styles/variables.module.scss
@@ -85,7 +85,7 @@
--menu-hover: rgba(147, 197, 253, 0.2);
--menu-active-bg: linear-gradient(135deg, #2f80ff 0%, #38bdf8 100%);
--menu-active-text: #f8fbff;
- --menu-surface: rgba(13, 43, 79, 0.94);
+ --menu-surface: linear-gradient(180deg, rgba(13, 43, 79, 0.97) 0%, rgba(8, 28, 52, 0.94) 100%);
--menu-active-glow: 0 8px 18px rgba(56, 139, 255, 0.28);
--app-bg: #f3f7fc;
@@ -140,7 +140,7 @@
--menu-hover: rgba(147, 197, 253, 0.2);
--menu-active-bg: linear-gradient(135deg, #2f80ff 0%, #38bdf8 100%);
--menu-active-text: #f8fbff;
- --menu-surface: rgba(13, 43, 79, 0.94);
+ --menu-surface: linear-gradient(180deg, rgba(13, 43, 79, 0.97) 0%, rgba(8, 28, 52, 0.94) 100%);
--text-primary: #1e293b;
--text-secondary: #334155;
--
Gitblit v1.9.3