From 250c2fb7f6662e18878ba4dea81c4feee771422f Mon Sep 17 00:00:00 2001 From: Hooray Hu <304327508@qq.com> Date: Wed, 26 Apr 2023 16:12:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20hidden=20=E7=B1=BB?= =?UTF-8?q?=E5=90=8D=EF=BC=8C=E9=81=BF=E5=85=8D=E5=92=8C=20unocss=20?= =?UTF-8?q?=E4=BA=A7=E7=94=9F=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/components/Search/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/components/Search/index.vue b/src/layouts/components/Search/index.vue index 80ca32d1..3cff3d1c 100644 --- a/src/layouts/components/Search/index.vue +++ b/src/layouts/components/Search/index.vue @@ -81,7 +81,7 @@ const resultList = computed(() => { watch(() => isShow.value, (val) => { if (val) { - document.body.classList.add('hidden') + document.body.classList.add('overflow-hidden') searchResultRef.value.scrollTop = 0 // 当搜索显示的时候绑定上、下、回车快捷键,隐藏的时候再解绑。另外当 input 处于 focus 状态时,采用 vue 来绑定键盘事件 hotkeys('up', keyUp) @@ -92,7 +92,7 @@ watch(() => isShow.value, (val) => { }, 500) } else { - document.body.classList.remove('hidden') + document.body.classList.remove('overflow-hidden') hotkeys.unbind('up', keyUp) hotkeys.unbind('down', keyDown) hotkeys.unbind('enter', keyEnter)