From 1d231c6cc3273e33cc4701a26d4dc4557a29a34b Mon Sep 17 00:00:00 2001 From: IanShaw027 <131567472+IanShaw027@users.noreply.github.com> Date: Thu, 15 Jan 2026 10:21:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(mobile):=20=E4=BF=AE=E5=A4=8D=20UsersView?= =?UTF-8?q?=20=E6=9B=B4=E5=A4=9A=E8=8F=9C=E5=8D=95=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E5=B9=B6=E7=BB=9F=E4=B8=80=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **问题描述**: - UsersView 的"更多"菜单仍然出现在页面左上角错误位置 - UsersView 使用 actionButtonRefs Map 获取按钮元素,导致定位失败 - UsersView 和 AccountsView 的菜单定位逻辑不一致,难以维护 **解决方案**: - 修改 openActionMenu 函数签名,添加 MouseEvent 参数 - 使用 e.currentTarget 直接从事件对象获取触发元素 - 移除不必要的 actionButtonRefs Map 和 setActionButtonRef 函数 - 统一菜单宽度为 200px(与 AccountsView 一致) - 完全复制 AccountsView 的定位逻辑,确保两者行为一致 **技术要点**: - 移动端:菜单居中对齐按钮,优先显示在按钮下方 - 桌面端:使用鼠标位置定位,添加边界检测 - 简化代码,移除不必要的防御性检查 - 两个组件的菜单定位逻辑完全一致,便于维护 --- frontend/src/views/admin/UsersView.vue | 81 +++++++++++++------------- 1 file changed, 40 insertions(+), 41 deletions(-) diff --git a/frontend/src/views/admin/UsersView.vue b/frontend/src/views/admin/UsersView.vue index 4a8dba30..4ce839f1 100644 --- a/frontend/src/views/admin/UsersView.vue +++ b/frontend/src/views/admin/UsersView.vue @@ -372,8 +372,7 @@