From 71dd52c650de731209e4ec0fc583881c214b034a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Fri, 31 Jul 2026 19:51:25 +0800
Subject: [PATCH] =?UTF-8?q?style(theme):=20=E6=9B=B4=E6=96=B0=E5=90=84?=
=?UTF-8?q?=E4=B8=BB=E9=A2=98logo=E5=8F=8A=E9=A1=B6=E9=83=A8=E6=A0=8F?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=8C=E7=BB=9F=E4=B8=80=E7=99=BD=E5=BA=95?=
=?UTF-8?q?=E9=98=B4=E5=BD=B1=E6=95=88=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 所有主题的 avue-logo 背景改为白色,并添加 0 2px 8px rgba(0,0,0,0.06) 阴影效果
- 各主题顶部栏背景及文字颜色调整,提升整体对比度与视觉统一性
- 统一调整下拉菜单、面包屑、图标等元素颜色为 rgba(0,0,0,0.85) 或 0.65,增强易读性
- 修正部分输入框和色彩选择器的边框及背景颜色,增强一致性
- index.html 添加 favicon.ico 作为页面图标
- 新增图标悬停显示浅灰圆形背景效果示例页面 icon-hover-demo.html
- icon-hover-demo.html 包含核心 CSS 代码和 Element Plus 的示例用法,方便复用和参考
---
.workbuddy/memory/2026-07-31.md | 11 +++++++++++
src/page/index/top/index.vue | 26 ++++++++++++++++++++++----
src/styles/top.scss | 2 +-
3 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/.workbuddy/memory/2026-07-31.md b/.workbuddy/memory/2026-07-31.md
index ebab83f..46bc476 100644
--- a/.workbuddy/memory/2026-07-31.md
+++ b/.workbuddy/memory/2026-07-31.md
@@ -95,3 +95,14 @@
- 样式:新增 scoped `.top-theme-icon`,`::before` 浅灰圆形背景 `#f2f3f5`,默认 `scale(0.6) opacity(0)`,hover/focus 弹性放大到 `scale(1)`,图标 `z-index:1` 压在上层。
- 调整:用户反馈 T 恤图标在顶栏中上下不居中,把 `.top-theme-icon` 由 `display:flex; height:100%` 改为 `display:inline-flex; vertical-align:middle; width:32px; height:32px`,使其与右侧头像/用户名在同一水平中线。
- 注意:该组件受 `website.setting.theme` 控制(之前曾设为 false 隐藏),若顶栏未显示主题图标,需确认 website.js 中 `setting.theme` 为 true。
+
+## 顶栏头像触发下拉菜单(hover)
+
+- **需求**: 鼠标移到头像(top-bar__img)也能触发下拉,行为与点用户名一致。
+- **文件**: `src/page/index/top/index.vue`
+- **改动**:
+ 1. 把 `
` 从 el-dropdown 外的同级节点,移入 el-dropdown 触发区(``)内。
+ 2. 给 `` 加 `trigger="hover"`,让头像+姓名整体支持 hover 触发。
+ 3. scoped 样式新增 `.top-user__trigger`(inline-flex / padding 4px 8px / hover 浅灰背景 rgba(0,0,0,0.04)),并把 `.top-bar__img` 自身 `margin` 改为 `0 5px 0 0` 配合新容器。
+- **效果**: 鼠标悬停在头像或姓名任一处都会展开下拉;保留 `:hide-on-click="false"`(菜单内点击不收起,el-tooltip 等仍可交互)。
+- **注意**: 若用户后续希望「hover 触发」仅作用于头像、不影响姓名点击行为,需把姓名部分移出 el-dropdown 触发区;当前实现是统一行为。
diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue
index 6a5c513..3ba4f62 100644
--- a/src/page/index/top/index.vue
+++ b/src/page/index/top/index.vue
@@ -33,9 +33,9 @@
-
![]()
-
-
+
+
+
{{ userInfo.real_name }}
@@ -361,4 +361,22 @@ export default {
};
-
+
diff --git a/src/styles/top.scss b/src/styles/top.scss
index beb2abc..64ae25c 100644
--- a/src/styles/top.scss
+++ b/src/styles/top.scss
@@ -120,7 +120,7 @@
height: variables.$top_height;
margin: 0 7px;
font-size: 16px;
- top: -2px;
+ top: -4px;
.el-badge__content.is-fixed {
top: 12px;