<template>
  <div class="pdfBody">
    <Pdf3 ref="pdf" @getPageTotal="getPageTotal" :getPage="getPage"></Pdf3>
  </div>
</template>

<script>
import Pdf3 from "./components/pdf3";
export default {
  components: {
    Pdf3,
  },
  data() {
    return {
      pageTotal: 0, //总页数
      page: 0, //第几页
    };
  },
  methods: {
    getPageTotal(total) {
      this.pageTotal = total;
    },
    getPage(page) {
      this.page = page;
      console.log(page);
    },
    nextPage(){
        this.$refs.pdf.nextPage();
    },
    prePage(){
        this.$refs.pdf.prePage();
    }
  },
};
</script>

<style>
.pdfBody {
  height: 100%;
  width: 100%;
  position: relative;
}
.btnbox {
  position: absolute;
  top: 0;
}
</style>