arkokoley / pdfvuer

A PDF viewer for Vue using Mozilla's PDF.js that supports both Vue2 and Vue3
https://arkokoley.github.io/pdfvuer
MIT License
918 stars 131 forks source link

vue.esm.js:1897 Error: Removed API method: PDFDocumentLoadingTask.then, use the `promise` getter instead. #74

Closed dingruibobo closed 4 years ago

dingruibobo commented 4 years ago

Is your feature request related to a problem? Please describe. vue.esm.js:1897 Error: Removed API method: PDFDocumentLoadingTask.then, use the promise getter instead. at Object.then (pdf.js:1448) at o.getPdf (index.vue:191) at o.getInfo (index.vue:166) at o.init (index.vue:155) at o.mounted (index.vue:138) at $e (vue.esm.js:1863) at nn (vue.esm.js:4228) at Object.insert (vue.esm.js:3148) at M (vue.esm.js:6357) at o.patch (vue.esm.js:6576)

mycode getPdf () { var self = this self.pdfdata = pdf.createLoadingTask(this.pdfUrl) self.pdfdata.then(pdf => { self.pdfPages = pdf._pdfInfo.numPages }) },