diff --git a/src/main/resources/static/components/plugins/sysFilePreview/PdfIndex.vue b/src/main/resources/static/components/plugins/sysFilePreview/PdfIndex.vue index 4457897..d624945 100644 --- a/src/main/resources/static/components/plugins/sysFilePreview/PdfIndex.vue +++ b/src/main/resources/static/components/plugins/sysFilePreview/PdfIndex.vue @@ -32,10 +32,15 @@ module.exports = { methods: { init() { try { + debugger const parser = new DOMParser(); const doc = parser.parseFromString(this.content, 'text/html'); const link = doc.querySelector('a'); const href = link.getAttribute('href'); + if(!href) { + this.pdf = false + return + } this.$nextTick(() => { this.pdfObj = new Pdfh5('#pdf-container', { pdfurl: href,