|
@@ -63,8 +63,10 @@ export default {
|
|
|
try {
|
|
|
const loadingTask = pdfjsLib.getDocument({
|
|
|
url: pdfUrl,
|
|
|
- disableRange: true
|
|
|
+ disableRange: true,
|
|
|
+ disableAutoFetch: true // 启动自动分块加载
|
|
|
})
|
|
|
+ pdfjsLib.GlobalWorkerOptions.workerSrc = 'pdfjs-dist/build/pdf.worker.mjs'
|
|
|
this.pdf = await loadingTask.promise
|
|
|
this.totalPages = this.pdf.numPages
|
|
|
this.currentPage = 1
|