chore: debug

This commit is contained in:
丁锐
2022-01-13 16:59:23 +08:00
parent 03bddd178d
commit 79b598315f
5 changed files with 121 additions and 130 deletions
+8 -8
View File
@@ -65,8 +65,8 @@
<script>
import * as Vue from 'vue'
import * as PDF from 'pdfjs-dist/es5/build/pdf.js'
import PDFWorker from 'pdfjs-dist/es5/build/pdf.worker.js'
import * as PDF from 'pdfjs-dist/legacy/build/pdf.js'
import PDFWorker from 'pdfjs-dist/legacy/build/pdf.worker.js'
import IFrameV3 from '../IFrame/IFrameV3'
import IFrame from '../IFrame/IFrame.vue'
import throttle from '../../utils/throttle'
@@ -260,12 +260,12 @@ export default {
const filename = PDF.getFilenameFromUrl(this.source)
this.$emit('update:filename', filename)
const documentLoadingTask = PDF.getDocument(this.source)
// const documentLoadingTask = PDF.getDocument({
// url: this.source,
// cMapPacked: true,
// cMapUrl: 'https://unpkg.com/browse/pdfjs-dist@2.2.228/cmaps/',
// })
// const documentLoadingTask = PDF.getDocument(this.source)
const documentLoadingTask = PDF.getDocument({
url: this.source,
cMapPacked: true,
cMapUrl: 'https://unpkg.com/browse/pdfjs-dist@2.2.228/cmaps/',
})
documentLoadingTask.onPassword = (callback, reason) => {
const retry = reason === PDF.PasswordResponses.INCORRECT_PASSWORD
this.$emit('password-requested', {