Skip to content

Commit

Permalink
fix: update deps and fix slidev 0.48 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
tonai committed Apr 2, 2024
1 parent e608ca0 commit eabcb0d
Show file tree
Hide file tree
Showing 3 changed files with 5,101 additions and 7,526 deletions.
13 changes: 5 additions & 8 deletions components/Pager.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<script setup lang="ts">
import type { SlidevContext } from "@slidev/client/modules/context.ts";
import { useNav } from "@slidev/client"
import { inject } from "vue";
import { injectionSlidevContext } from "@slidev/client/constants.ts"
const $slidev = inject(injectionSlidevContext, {} as SlidevContext)
const { currentPage, currentLayout, total } = useNav()
</script>

<style scoped>
Expand All @@ -29,9 +26,9 @@ const $slidev = inject(injectionSlidevContext, {} as SlidevContext)
</style>

<template>
<div class="pager" :class="{ [`pager--${$slidev.nav.currentLayout}`]: $slidev.nav.currentLayout }">
<span class="pager__current">{{ $slidev.nav.currentPage }}</span>
<div class="pager" :class="{ [`pager--${currentLayout}`]: currentLayout }">
<span class="pager__current">{{ currentPage }}</span>
<span class="pager__separator">/</span>
<span class="pager__total">{{ $slidev.nav.total }}</span>
<span class="pager__total">{{ total }}</span>
</div>
</template>

0 comments on commit eabcb0d

Please sign in to comment.