<template>
  <div class="pdfBox">
    <div id="previewPdf"></div>
  </div>
</template>
<script>
import Pdfh5 from 'pdfh5'
import 'pdfh5/css/pdfh5.css'
export default {
  name: 'pdfh5',
  data () {
    return {
      pdfh5: null
    }
  },
  methods: {
    openPdf (url) { // url：PDF文件地址
      this.pdfh5 = new Pdfh5('#previewPdf', {
        pdfurl: url
      })
    }
  }
}
</script>
<style lang="less" scoped>
.pdfBox {
  width: 100%;
  height: 100%;
  background: #fff;
  overflow: hidden;
  z-index: 99;
}
</style>
