700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > pdf.worker.js找不到的错误

pdf.worker.js找不到的错误

时间:2022-11-12 07:58:15

相关推荐

pdf.worker.js找不到的错误

网上的资料一直都是更换版本

“vue-pdf”: “^4.2.0”,

“pdfjs-dist”: “^2.5.207”,

但是无效,一直找不到,

最终在下面的目录下新建一个es5文件夹,并将legacy中的三个文件夹内容复制过来。

process找不到怎么改

在public里面新建文件夹,然后新建PDFFile文件夹,里面放置PDF文件

在线帮助页面这样写

Help.vue

<template><div class="d-flex-column h-100 "><div class="pdfWrapper flex-grow-1"><pdfv-for="(i,index) in numPages":src="pdfPath":page="i":key="index"></pdf></div></div></template><script>import pdf from 'vue-pdf'import pdfPath from "../../public/PDFFile/PDFW_SampleBodyVisibility_2_3.pdf"export default {name: "Help",components: {pdf},data() {return {currentPage: 1, // 页码pageCount: 5, // 总页数numPages: 1,pdfPath: pdfPath,}},mounted() {this.handelPdf()},methods: {async handelPdf() {this.numPages = await pdf.createLoadingTask(this.pdfPath).promise.then(pdf => {return pdf.numPages})},}}</script><style scoped>.pdfWrapper {overflow: scroll;}</style>

一些错误的解决方法

/article/261614.htm

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。