<template>
  <div style="height: 100%;">
    <pdf-preview :url="pdfUrl"/>
  </div>
</template>


<script>
import PdfPreview from './PdfPreview.vue'

export default {
  name: 'PdfView',
  components: {
    PdfPreview
  },
  data() {
    return {
      pdfUrl: '' // 初始化为空字符串
    }
  },
  created() {
    // 在组件创建时获取路由信息
    this.pdfUrl = this.$route.query.url || ''; // 假设pdfUrl是通过查询参数传递的
    console.log( this.pdfUrl,' this.pdfUrl');
    
  }
}
</script>