You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/client/logic/slides.ts
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
importtype{SlideRoute}from'@slidev/types'
2
2
import{slides}from'#slidev/slides'
3
3
import{computed,watch,watchEffect}from'vue'
4
+
import{useNav}from'../composables/useNav'
4
5
import{useSlideContext}from'../context'
5
6
6
7
export{slides}
@@ -23,8 +24,9 @@ export function getSlidePath(
23
24
}
24
25
25
26
exportfunctionuseIsSlideActive(){
26
-
const{ $page, $nav }=useSlideContext()
27
-
returncomputed(()=>$page.value===$nav.value.currentSlideNo)// Use `$nav.value.currentSlideNo` rather than `useNav().currentSlideNo` to make it work in print/export mode. See https://github.com/slidevjs/slidev/issues/2310.
0 commit comments