12345678910111213141516171819 |
- <template>
- <iframe :src="pdfjsAddr + `?file=${encodeURIComponent(props.src)}`" frameborder="0"
- :style="{ height: props.parentHeight + 'px' }"></iframe>
- </template>
- <script setup>
- const props = defineProps({ src: { type: String, default: "" }, parentHeight: Number })
- import { pdfjsAddr } from '@/utils/config';
- </script>
- <style lang="less" scoped>
- iframe {
- width: 100%;
- // height: 1000px;
- // box-sizing: margin-box;
- margin: 0px;
- padding: 0px;
- }
- </style>
|