From a6e66c3f4760c111f08a8573b2ebc3da164ef283 Mon Sep 17 00:00:00 2001 From: Hooray <304327508@qq.com> Date: Sat, 22 Feb 2025 10:44:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=BC=E8=88=AA=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=94=A4=E8=B5=B7=E6=97=B6=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E6=9C=AA=E8=81=9A=E7=84=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/components/Topbar/Toolbar/NavSearch/search.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/layouts/components/Topbar/Toolbar/NavSearch/search.vue b/src/layouts/components/Topbar/Toolbar/NavSearch/search.vue index 78d524ff..44f5c9a0 100644 --- a/src/layouts/components/Topbar/Toolbar/NavSearch/search.vue +++ b/src/layouts/components/Topbar/Toolbar/NavSearch/search.vue @@ -6,6 +6,7 @@ import useMenuStore from '@/store/modules/menu' import useRouteStore from '@/store/modules/route' import useSettingsStore from '@/store/modules/settings' import { resolveRoutePath } from '@/utils' +import { useFocus } from '@vueuse/core' import hotkeys from 'hotkeys-js' defineOptions({ @@ -29,6 +30,8 @@ interface listTypes { } const searchInput = ref('') +const searchInputRef = useTemplateRef('searchInputRef') +const { focused: searchInputFocused } = useFocus(searchInputRef) const sourceList = ref([]) const actived = ref(-1) @@ -197,13 +200,13 @@ function pageJump(path: listTypes['path'], link: listTypes['link']) {