<template>
  <div>
    <pdfPreview :url="url" @PdfLoding="Childlogin" @PdfLodingPage="loadingpage"  ref="pdfPreview"></pdfPreview>
  </div>
</template>

<script>
  import pdfPreview from '../components/PdfPreview'
  export default {
    name: 'pdf',
    components: {
      pdfPreview
    },
    data() {
      return {
        url: '/static/pdf.pdf'
        }
        },
        methods: {
            Childlogin(e) {
                if (e === 1) {
                    this.$emit('LoadingPdf',1)
                } else {
                     this.$emit('LoadingPdf',0)
                }
            },
            loadingpage(i) {
                this.$emit('LoadingPdfPage',i)
            },
            pdfloadingmsg(e) {
                this.$emit('PdfloadingMsg',e)
            },
            thumbnailimage() {
                console.log('调用到了一级方法')
                this.$refs.pdfPreview.thumbnail()
            }
        }
  }
</script>
