From 96b213354b9a04ce254bf3e4b71e6973e04486df Mon Sep 17 00:00:00 2001 From: Zhou Weidong <502333560@qq.com> Date: Mon, 9 Nov 2026 10:27:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(layout):=20=E6=89=A9=E5=A4=A7=E9=A1=B6?= =?UTF-8?q?=E6=A0=8F=E5=9B=BE=E6=A0=87=E4=B8=8E=E7=94=A8=E6=88=B7=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E7=82=B9=E5=87=BB=E7=83=AD=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/UserInfo/src/UserInfo.vue | 19 ++++++++++------ src/layout/components/ToolHeader.vue | 28 +++++++++++++++++++++++- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/components/UserInfo/src/UserInfo.vue b/src/components/UserInfo/src/UserInfo.vue index f0a8ecc..19959a5 100644 --- a/src/components/UserInfo/src/UserInfo.vue +++ b/src/components/UserInfo/src/UserInfo.vue @@ -40,10 +40,19 @@ const dialogVisible = ref(false) const lockScreen = () => { dialogVisible.value = true } + +// 点击整行菜单项都能触发(之前 click 绑在内层文字 div 上,点到菜单项左右内边距没反应) +const handleCommand = (command: string) => { + if (command === 'lock') { + lockScreen() + } else if (command === 'logout') { + loginOut() + } +}