| 123456789101112131415161718192021222324252627282930 |
- <template>
- <iframe :title="title" :src="pdfSrc" :width="width" :height="height" style="border: none;" />
- </template>
- <script setup lang="ts">
- import { withBase } from 'vitepress'
- import { computed } from 'vue-demi'
- const props = defineProps({
- title: {
- type: String,
- default: ''
- },
- file: {
- type: String,
- required: true
- },
- width: {
- type: String,
- default: '100%'
- },
- height: {
- type: String,
- default: '600px'
- }
- })
- // const props = defineProps(['title', 'file', 'width', 'height'])
- const pdfSrc = computed(() => withBase(props.file))
- </script>
|