From 94e32e2048aaf8777a94ce8c6c350ac49295ecee Mon Sep 17 00:00:00 2001 From: zhangrenyuan <18990852002@163.com> Date: Thu, 25 Sep 2025 16:47:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=83=8C=E6=99=AF=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E5=AE=8C=E6=88=90=EF=BC=8C=E5=8C=85=E6=8B=AC?= =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=EF=BC=8C=E5=A4=B4=E9=83=A8=EF=BC=8C?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=8C=BA=E5=9F=9F=E8=83=8C=E6=99=AF=EF=BC=8C?= =?UTF-8?q?=E6=82=AC=E6=B5=AE=E6=8C=89=E9=92=AE=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home.vue | 85 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 32 deletions(-) diff --git a/src/views/home.vue b/src/views/home.vue index c9fa877..2724c45 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -48,6 +48,10 @@ function findBestMatch(menuList, path) { return bestMatch || path // fallback 到当前路径 } +// 获取菜单图标(require动态导入) + + + // 响应式高亮菜单 const activeMenu = computed(() => { return findBestMatch(menuList.value, route.path) @@ -112,26 +116,38 @@ function logout() { @@ -240,9 +258,7 @@ function logout() { left: 1vh; right: 1vh; bottom: 1vh; - /* 毛玻璃效果 */ background-image: url('@/assets/半透明background.png'); - z-index: 1; display: flex; flex-direction: row; @@ -253,6 +269,7 @@ function logout() { /* 侧边栏容器 */ .sidebar-container { flex-shrink: 0; + } .logo { display: flex; @@ -271,7 +288,6 @@ function logout() { /* 底部设置中心样式 */ .settings-container { padding: 10px 0 10px 20px; /* 上,右, 下,左 */ - background: rgba(255, 255, 255, 0.85); display: flex; align-items: center; /* 垂直居中 */ } @@ -279,7 +295,7 @@ function logout() { /* 调整下拉菜单的样式,确保它向上弹出 */ .el-dropdown-link:focus { - /* 移除异常效果 */ + /* 移除底部的异常效果 */ outline: none; text-decoration: none; } @@ -292,13 +308,14 @@ function logout() { .sidebar-layout { width: 15vw; height: 100%; - background: rgba(255, 255, 255, 0.85); /* 半透明白色背景 */ - backdrop-filter: blur(5px); /* 毛玻璃效果 */ + background: #E7F4FD; /* 浅蓝色背景 */ + /* backdrop-filter: blur(5px); 毛玻璃效果 --消耗性能 */ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* 添加阴影增强层次感 */ border-radius: 12px; display: flex; flex-direction: column; position: relative; + transition: all 0.3s ease; } /* 内容区域容器 */ @@ -314,13 +331,17 @@ function logout() { /* 头部样式 */ .header { - background: rgba(255, 255, 255, 0.9); - /* 半透明白色背景 */ - backdrop-filter: blur(5px); - /* 毛玻璃效果 */ - height: 8vh; + /* 将纯色背景替换为线性渐变 */ + background: linear-gradient( + 90deg, + rgba(228, 240, 252, 1) 20%, + rgba(190, 218, 247, 1) 50%, + rgba(228, 240, 252, 1) 100% + ); + height: 6vh; border-radius: 12px; - box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); + margin-bottom: 4px; + box-shadow: 0 2px 5px rgba(8, 4, 4, 0.1); /* 添加阴影增强层次感 */ z-index: 80; } @@ -328,9 +349,9 @@ function logout() { /* 主内容区域容器 */ .main-area { flex: 1; - background: rgba(255, 255, 255, 0.9); + background: #E7F4FD; /* 半透明白色背景 */ - backdrop-filter: blur(5px); + /* backdrop-filter: blur(5px); */ /* 毛玻璃效果 */ border-radius: 12px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); @@ -356,23 +377,23 @@ function logout() { width: 100%; } -/* 感觉没用 */ -.el-menu-demo { - border: none; - padding: 0; - float: right; - background: transparent !important; - /* 最高优先级的透明 */ -} - -/* 侧边栏菜单样式优化 感觉没用*/ +/* 侧边栏菜单样式 适配浅色背景 */ .el-menu { background: transparent !important; } -::v-deep(.el-sub-menu__title:hover) { - background: transparent !important; + +/* 工作台,金币管理,现金管理 */ +::v-deep(.el-sub-menu__title:hover), +::v-deep(.el-menu-item:hover) { + background: #E5EBFE; } +/* 子菜单展开时和背景同色 */ +::v-deep(.el-sub-menu__title), +::v-deep(.el-menu-item) { + background: #E7F4FD; +} + .message-font { /* 个人信息字体样式 */ From 7f73f8ab092f2441149a5f057f545a258e6401cf Mon Sep 17 00:00:00 2001 From: zhangrenyuan <18990852002@163.com> Date: Fri, 26 Sep 2025 14:16:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?header=20=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home.vue | 5 +++-- src/views/workspace/index.vue | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/src/views/home.vue b/src/views/home.vue index 2724c45..3ca4933 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -192,10 +192,10 @@ function logout() {
- +
@@ -259,6 +259,7 @@ function logout() { right: 1vh; bottom: 1vh; background-image: url('@/assets/半透明background.png'); + background-size: cover; z-index: 1; display: flex; flex-direction: row; diff --git a/src/views/workspace/index.vue b/src/views/workspace/index.vue index 13df762..1a3d69f 100644 --- a/src/views/workspace/index.vue +++ b/src/views/workspace/index.vue @@ -1,4 +1,8 @@