diff --git a/src/client/theme-default/components/VPLocalNav.vue b/src/client/theme-default/components/VPLocalNav.vue index 047e0101..b827798a 100644 --- a/src/client/theme-default/components/VPLocalNav.vue +++ b/src/client/theme-default/components/VPLocalNav.vue @@ -1,7 +1,7 @@ diff --git a/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue b/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue index a879699b..7b278214 100644 --- a/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue +++ b/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue @@ -6,8 +6,9 @@ import { resolveTitle, type MenuItem } from '../composables/outline' import VPDocOutlineItem from './VPDocOutlineItem.vue' import VPIconChevronRight from './icons/VPIconChevronRight.vue' -defineProps<{ +const props = defineProps<{ headers: MenuItem[] + navHeight: number }>() const { theme } = useData() @@ -21,7 +22,7 @@ onContentUpdated(() => { function toggle() { open.value = !open.value - vh.value = window.innerHeight + Math.min(window.scrollY - 64, 0) + vh.value = window.innerHeight + Math.min(window.scrollY - props.navHeight, 0) } function onItemClick(e: Event) {