Template
<pdf ref="pdf" :src="pdfUrl" style="width: 100%;"></pdf>
Installation pdf
npm install --save vue-pdf
In the page you want to use references
import pdf from 'vue-pdf' export default { components:{ pdf:pdf }, }
Direct assignment to get back to the url pdf
this.pdfUrl = pdf.createLoadingTask(pdfurl)
Related Links Learning https://blog.csdn.net/weixin_43452622/article/details/88234792
pdf preview dom: https://github.com/goSunadeod/vue-pdf.js-demo