<template>
  <iframe :src="pdfjsAddr + `?file=${encodeURIComponent(props.src)}`" frameborder="0"
    :style="{ height: props.parentHeight - 2 + 'px' }" />
</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;
}
</style>