第一步 导入pdf.js插件 下载地址
1.下载完成后打开 static 目录下 创建pdf文件夹放入build和web文件夹。
2.iframe 引入 :src=“pdf文件流地址”。
<el-dialog :visible.sync="dialogTableVisible">
<div class="pdf" style="height: 100%;">
<iframe :src="'/static/pdf/web/viewer.html?file='+ pdfUrl" style="width: 100%; height: 100%"/>
</