From 9b172f684c92c68c2a0b3923bbb0e4ba70c9beda Mon Sep 17 00:00:00 2001 From: ZiuChen <457353192@qq.com> Date: Thu, 8 Sep 2022 20:25:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E6=8C=89=E4=B8=8BESC?= =?UTF-8?q?=E9=94=AE=E6=90=9C=E7=B4=A2=E6=A1=86=E7=9A=84=E8=A1=A8=E7=8E=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Main.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/views/Main.vue b/src/views/Main.vue index fa55477..494beaa 100644 --- a/src/views/Main.vue +++ b/src/views/Main.vue @@ -184,11 +184,15 @@ onMounted(() => { if (filterText.value) { // 有筛选词 先清空筛选词 filterText.value = '' - } else { - // 无筛选词 隐藏搜索框 + window.focus() + e.stopPropagation() + } else if (isSearchPanelExpand.value) { + // 移除焦点 隐藏搜索框 window.focus(true) + e.stopPropagation() + } else { + // 无上述情况 执行默认: 隐藏uTools主窗口 } - e.stopPropagation() } else if (ctrlKey || metaKey || isArrow || isEnter) { // 仅有 Ctrl时 什么也不执行 (utools模拟执行粘贴时触发) e.preventDefault()