From 7ba47879f7622a3d479854018a18738b7fc6937e Mon Sep 17 00:00:00 2001 From: Hooray Hu <304327508@qq.com> Date: Tue, 21 Nov 2023 11:37:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=AC=A1=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E7=AC=AC=E4=B8=80=E4=B8=AA=E5=AF=BC=E8=88=AA=E6=97=A0?= =?UTF-8?q?=E5=AD=90=E7=BA=A7=E8=B7=AF=E7=94=B1=E6=97=B6=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/components/Search/index.vue | 1 - src/layouts/components/SubSidebar/index.vue | 7 +++++-- src/layouts/components/Topbar/Toolbar/index.vue | 7 +++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/layouts/components/Search/index.vue b/src/layouts/components/Search/index.vue index 4a87a36..595f3d4 100755 --- a/src/layouts/components/Search/index.vue +++ b/src/layouts/components/Search/index.vue @@ -225,7 +225,6 @@ function keyEnter() { searchResultItemRef.value.find(item => Number.parseInt(item.dataset.index!) === actived.value)?.click() } } -// FIXME 列表数据变更后,快捷键滚动失效 function handleScroll() { if (searchResultRef.value) { const contentDom = searchResultRef.value.osInstance()!.elements().content diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue index f26d999..2279ff6 100755 --- a/src/layouts/components/SubSidebar/index.vue +++ b/src/layouts/components/SubSidebar/index.vue @@ -24,8 +24,11 @@ const enableSidebar = computed(() => { ['side', 'head', 'single'].includes(settingsStore.settings.menu.menuMode) && menuStore.sidebarMenus.length !== 0 && !( - !menuStore.sidebarMenus[0].children - || menuStore.sidebarMenus[0]?.children.every(item => item.meta?.sidebar === false) + menuStore.sidebarMenus.length === 1 + && ( + !menuStore.sidebarMenus[0].children + || menuStore.sidebarMenus[0]?.children.every(item => item.meta?.sidebar === false) + ) ) ) }) diff --git a/src/layouts/components/Topbar/Toolbar/index.vue b/src/layouts/components/Topbar/Toolbar/index.vue index 16a75be..30b8e22 100755 --- a/src/layouts/components/Topbar/Toolbar/index.vue +++ b/src/layouts/components/Topbar/Toolbar/index.vue @@ -20,8 +20,11 @@ const enableSubMenuCollapseButton = computed(() => { ['side', 'head', 'single'].includes(settingsStore.settings.menu.menuMode) && settingsStore.settings.menu.enableSubMenuCollapseButton && !( - !menuStore.sidebarMenus[0].children - || menuStore.sidebarMenus[0]?.children.every(item => item.meta?.sidebar === false) + menuStore.sidebarMenus.length === 1 + && ( + !menuStore.sidebarMenus[0].children + || menuStore.sidebarMenus[0]?.children.every(item => item.meta?.sidebar === false) + ) ) ) })