fix: 修复次导航第一个导航无子级路由时不显示

This commit is contained in:
Hooray Hu 2023-11-21 11:37:43 +08:00
parent 45567dddbc
commit 7ba47879f7
3 changed files with 10 additions and 5 deletions

View File

@ -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

View File

@ -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)
)
)
)
})

View File

@ -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)
)
)
)
})