|
@@ -18,10 +18,10 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex'
|
|
|
-import * as pdfjsLib from 'pdfjs-dist/build/pdf'
|
|
|
+// import * as pdfjsLib from 'pdfjs-dist/build/pdf'
|
|
|
import AdSingle from '@/components/ad/Ad'
|
|
|
import { getAssetsFile } from '@/utils'
|
|
|
-import 'pdfjs-dist/build/pdf.worker.mjs'
|
|
|
+// import 'pdfjs-dist/build/pdf.worker.mjs'
|
|
|
|
|
|
export default {
|
|
|
name: 'PdfViewExample',
|
|
@@ -49,14 +49,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- const container = document.getElementById('pdf-container')
|
|
|
+ // const container = document.getElementById('pdf-container')
|
|
|
|
|
|
- this.loadPdf(this.pdfUrl, container)
|
|
|
- // 监听窗口的 resize 事件,实现自适应效果
|
|
|
- window.addEventListener('resize', () => {
|
|
|
- container.innerHTML = ''
|
|
|
- this.loadPdf(this.pdfUrl, container)
|
|
|
- })
|
|
|
+ // this.loadPdf(this.pdfUrl, container)
|
|
|
+ // // 监听窗口的 resize 事件,实现自适应效果
|
|
|
+ // window.addEventListener('resize', () => {
|
|
|
+ // container.innerHTML = ''
|
|
|
+ // this.loadPdf(this.pdfUrl, container)
|
|
|
+ // })
|
|
|
},
|
|
|
methods: {
|
|
|
async loadPdf(pdfUrl, container) {
|