From b4883543692c684ba8712e8b3f8fee4c6f6fde95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=9D=E5=B0=98?= <237809796@qq.com> Date: Mon, 28 Sep 2026 13:53:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E:=20=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=88=97=E8=A1=A8=E5=8F=B3=E9=94=AE=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 右键弹出连接编辑删除,复用既有操作链路 - 本地项仅连接,远程项含编辑删除 - 与三点菜单和设置面板互斥展开 --- .../FileSystem/components/Sidebar.vue | 73 ++++++++++++++----- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/frontend/src/components/FileSystem/components/Sidebar.vue b/frontend/src/components/FileSystem/components/Sidebar.vue index b04244e..710e980 100644 --- a/frontend/src/components/FileSystem/components/Sidebar.vue +++ b/frontend/src/components/FileSystem/components/Sidebar.vue @@ -19,26 +19,49 @@ 内存 ··· - -
+ - {{ p.name }} - {{ sysInfo(p.id)?.diskUsage || '-' }} - {{ sysInfo(p.id)?.cpuUsage || '-' }} - {{ sysInfo(p.id)?.memUsage || '-' }} - ··· - -
+
+ {{ p.name }} + {{ sysInfo(p.id)?.diskUsage || '-' }} + {{ sysInfo(p.id)?.cpuUsage || '-' }} + {{ sysInfo(p.id)?.memUsage || '-' }} + ··· + +
+ + @@ -268,6 +291,7 @@ function toggleSettings(e: MouseEvent) { return } moreOpenId.value = null + srvCtxMenuIndex.value = -1 const btn = (e.target as HTMLElement).closest('.settings-btn') if (!btn) return settingsPanelStyle.value = calcPopupStyle(btn) @@ -281,6 +305,7 @@ function toggleMore(p: { id: string; name: string }, e: MouseEvent) { return } settingsOpen.value = false + srvCtxMenuIndex.value = -1 moreOpenId.value = p.id moreProfile.value = p const target = (e.target as HTMLElement).closest('.more-btn') as HTMLElement @@ -611,6 +636,18 @@ function handleDelete(p: { id: string; name: string }) { // 删除的是活跃服务器时连接已回落本地,补发切换让视图加载本地根目录 if (wasActive) emit('serverSelect', 'local-default') } + +// 服务器项右键菜单(与行内「...」菜单互斥:一方展开强制收起另一方) +const srvCtxMenuIndex = ref(-1) + +function onSrvCtxVisible(index: number, visible: boolean) { + srvCtxMenuIndex.value = visible ? index : -1 + if (visible) { + moreOpenId.value = null + moreProfile.value = null + settingsOpen.value = false + } +}