23 lines
462 B
Vue
23 lines
462 B
Vue
<template>
|
|
<div :class="$style.container">
|
|
<VuePdf v-for="page in pages" :key="page" :pdf="pdf" :page="page" />
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const props = defineProps<{ src: string }>();
|
|
|
|
import { VuePdf, usePDF } from "@vue3-office/vue-pdf";
|
|
import "@vue3-office/vue-pdf/style.css";
|
|
|
|
const { pdf, pages, info } = usePDF(props.src);
|
|
</script>
|
|
|
|
<style module>
|
|
.container {
|
|
width: 100%;
|
|
max-height: 80vh;
|
|
overflow: scroll;
|
|
}
|
|
</style>
|