Skip to content

Commit 7c650a0

Browse files
committed
✨ feat(左侧菜单与系统logo样式优化): 调整左侧菜单的折叠宽度为64px,更新系统logo样式为协调系统主题的卡片风格,优化渐变背景、阴影效果及hover状态,提升视觉效果和用户交互体验。
1 parent 023b44d commit 7c650a0

3 files changed

Lines changed: 53 additions & 44 deletions

File tree

src/layouts/LeftMenu/component/SystemLogo.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ import logo from '@/assets/images/icon-192.png';
55
import { usePreferencesStore } from '@/stores/store';
66

77
/**
8-
* 系统logo - 圆角立体卡片风格
8+
* 系统logo - 协调系统主题的卡片风格
99
* @returns
1010
*/
1111
const SystemLogo = () => {
1212
const colorPrimary = usePreferencesStore((state) => state.preferences.theme.colorPrimary);
13-
1413
return (
1514
<div className="flex justify-between items-center toolbox">
1615
<Link to="/" style={{ width: '100%' }}>

src/layouts/LeftMenu/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const LeftMenu: React.FC = () => {
3838
return (
3939
<Layout.Sider
4040
trigger={null}
41-
collapsedWidth={48}
41+
collapsedWidth={64}
4242
style={{
4343
overflow: 'hidden',
4444
position: 'relative',

src/layouts/LeftMenu/leftMenu.scss

Lines changed: 51 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -26,52 +26,64 @@
2626

2727

2828

29-
// 新的圆角立体卡片风格logo
29+
// 协调系统主题的logo卡片风格
3030
.system-logo-card {
3131
height: 64px;
3232
margin: 8px 12px;
3333
position: relative;
34-
border-radius: 16px;
34+
border-radius: 12px;
3535
overflow: hidden;
36-
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
36+
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
3737
cursor: pointer;
3838

39-
// 靛蓝系列渐变背景 - 左上到右下
39+
// 与系统主题协调的渐变背景
4040
background: linear-gradient(135deg,
41-
#1e3a8a 0%, // 深靛蓝
42-
#4338ca 100% // 靛蓝紫
41+
#f8fafc 0%, // 浅灰白
42+
#e2e8f0 50%, // 浅灰
43+
#cbd5e1 100% // 中灰
4344
);
4445

45-
// 立体阴影效果 - 减少扩散范围
46+
// 边框和阴影效果
47+
border: 1px solid rgba(148, 163, 184, 0.2);
4648
box-shadow:
47-
0 4px 16px rgba(30, 58, 138, 0.2),
48-
0 2px 8px rgba(30, 58, 138, 0.15),
49-
inset 0 1px 0 rgba(255, 255, 255, 0.1),
50-
inset 0 -1px 0 rgba(0, 0, 0, 0.1);
49+
0 2px 8px rgba(0, 0, 0, 0.06),
50+
0 1px 3px rgba(0, 0, 0, 0.1),
51+
inset 0 1px 0 rgba(255, 255, 255, 0.8);
5152

5253
// hover浮动效果
5354
&:hover {
54-
transform: translateY(-4px) scale(1.02);
55+
transform: translateY(-2px);
56+
background: linear-gradient(135deg,
57+
#ffffff 0%, // 纯白
58+
#f1f5f9 50%, // 极浅灰
59+
#e2e8f0 100% // 浅灰
60+
);
61+
border-color: rgba(59, 130, 246, 0.3);
5562
box-shadow:
56-
0 8px 24px rgba(30, 58, 138, 0.3),
57-
0 4px 12px rgba(30, 58, 138, 0.25),
58-
0 2px 6px rgba(30, 58, 138, 0.2),
59-
inset 0 1px 0 rgba(255, 255, 255, 0.15),
60-
inset 0 -1px 0 rgba(0, 0, 0, 0.1);
63+
0 4px 16px rgba(0, 0, 0, 0.1),
64+
0 2px 8px rgba(0, 0, 0, 0.08),
65+
inset 0 1px 0 rgba(255, 255, 255, 0.9);
6166

6267
.logo-background {
63-
transform: scale(1.1) rotate(3deg);
64-
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
68+
transform: scale(1.05);
69+
background: linear-gradient(135deg,
70+
rgba(59, 130, 246, 0.1) 0%,
71+
rgba(59, 130, 246, 0.05) 100%
72+
);
73+
border-color: rgba(59, 130, 246, 0.2);
6574
}
6675

6776
.system-name {
68-
transform: translateX(4px);
69-
text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
77+
transform: translateX(2px);
78+
color: #1e40af;
7079
}
7180

7281
.card-glow {
73-
opacity: 1;
74-
transform: scale(1.1);
82+
opacity: 0.3;
83+
background: linear-gradient(135deg,
84+
rgba(59, 130, 246, 0.1) 0%,
85+
rgba(147, 197, 253, 0.05) 100%
86+
);
7587
}
7688
}
7789

@@ -95,21 +107,20 @@
95107
.logo-background {
96108
width: 48px;
97109
height: 48px;
98-
border-radius: 12px;
110+
border-radius: 10px;
99111
background: linear-gradient(135deg,
100-
rgba(255, 255, 255, 0.2) 0%,
101-
rgba(255, 255, 255, 0.1) 50%,
102-
rgba(255, 255, 255, 0.05) 100%
112+
rgba(255, 255, 255, 0.8) 0%,
113+
rgba(248, 250, 252, 0.6) 50%,
114+
rgba(241, 245, 249, 0.4) 100%
103115
);
104-
backdrop-filter: blur(10px);
105-
border: 1px solid rgba(255, 255, 255, 0.1);
116+
border: 1px solid rgba(148, 163, 184, 0.3);
106117
display: flex;
107118
align-items: center;
108119
justify-content: center;
109120
transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
110121
box-shadow:
111-
0 4px 12px rgba(0, 0, 0, 0.15),
112-
inset 0 1px 0 rgba(255, 255, 255, 0.2);
122+
0 2px 6px rgba(0, 0, 0, 0.08),
123+
inset 0 1px 0 rgba(255, 255, 255, 0.9);
113124
}
114125

115126
// logo图片
@@ -129,10 +140,9 @@
129140
align-items: center;
130141
position: relative;
131142
z-index: 1;
132-
font-weight: 700;
133-
font-size: 18px;
134-
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
135-
letter-spacing: 0.5px;
143+
font-weight: 600;
144+
font-size: 16px;
145+
letter-spacing: 0.3px;
136146
}
137147

138148
// 发光效果
@@ -142,16 +152,16 @@
142152
left: -2px;
143153
right: -2px;
144154
bottom: -2px;
145-
border-radius: 18px;
155+
border-radius: 14px;
146156
background: linear-gradient(135deg,
147-
rgba(99, 102, 241, 0.3) 0%,
148-
rgba(67, 56, 202, 0.2) 50%,
149-
rgba(99, 102, 241, 0.3) 100%
157+
rgba(59, 130, 246, 0.1) 0%,
158+
rgba(147, 197, 253, 0.05) 50%,
159+
rgba(59, 130, 246, 0.1) 100%
150160
);
151161
opacity: 0;
152-
transition: all 0.4s ease;
162+
transition: all 0.3s ease;
153163
z-index: 0;
154-
filter: blur(8px);
164+
filter: blur(4px);
155165
}
156166
}
157167

0 commit comments

Comments
 (0)