From b5931311c9c80899bd41e2b606d3bef1ba52fc49 Mon Sep 17 00:00:00 2001 From: Raj Singh <101642134+rajxsingh@users.noreply.github.com> Date: Thu, 14 Nov 2024 07:08:25 +0100 Subject: [PATCH] fix: ToC link in Presenter Mode (#1936) Co-authored-by: _Kerman --- packages/client/builtin/TocList.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/client/builtin/TocList.vue b/packages/client/builtin/TocList.vue index d8e7cc6f89..3514d0eacb 100644 --- a/packages/client/builtin/TocList.vue +++ b/packages/client/builtin/TocList.vue @@ -11,6 +11,7 @@ import type { TocItem } from '@slidev/types' import TitleRenderer from '#slidev/title-renderer' import { toArray } from '@antfu/utils' import { computed } from 'vue' +import { useNav } from '../composables/useNav' const props = withDefaults(defineProps<{ level: number @@ -20,6 +21,8 @@ const props = withDefaults(defineProps<{ listClass?: string | string[] }>(), { level: 1 }) +const { isPresenter } = useNav() + const classes = computed(() => { return [ ...toArray(props.listClass || []), @@ -47,7 +50,7 @@ const styles = computed(() => { :key="item.path" class="slidev-toc-item" :class="[{ 'slidev-toc-item-active': item.active }, { 'slidev-toc-item-parent-active': item.activeParent }]" > - +