<template>
  <div class="preview-pdf">
    <iframe
      :src="src"
      class="preview-pdf-content"
      frameborder="0"
    />
  </div>
</template>

<script>
export default {
  name: "PdfPreview",
  props: {
    src: {
      type: String,
      required: true,
      description: "PDF文件的URL或路径"
    }
  }
};
</script>

<style scoped>
.preview-pdf {
  width: 100%;
  height: 70vh;
}

.preview-pdf-content {
  width: 100%;
  height: 100%;
}
</style>