diff --git a/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue b/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue index cf842baa..2581900e 100644 --- a/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue +++ b/src/client/theme-default/components/VPLocalNavOutlineDropdown.vue @@ -6,6 +6,7 @@ import { nextTick, ref, watch } from 'vue' import { useData } from '../composables/data' import { resolveTitle } from '../composables/outline' import VPDocOutlineItem from './VPDocOutlineItem.vue' +import { useSidebar } from '../composables/sidebar' const props = defineProps<{ headers: DefaultTheme.OutlineItem[] @@ -17,6 +18,7 @@ const open = ref(false) const vh = ref(0) const main = ref() const items = ref() +const { hasSidebar } = useSidebar() function closeOnClickOutside(e: Event) { if (!main.value?.contains(e.target as Node)) { @@ -68,6 +70,9 @@ function scrollToTop() { class="VPLocalNavOutlineDropdown" :style="{ '--vp-vh': vh + 'px' }" ref="main" + :class="{ + 'has-sidebar': hasSidebar, + }" >