From 39595080f0fe3a0d755eb43e2ef4f1a3301d3f6a Mon Sep 17 00:00:00 2001 From: server Date: Mon, 15 Sep 2025 17:57:57 +0800 Subject: [PATCH] .. --- .../static/components/plugins/sysFilePreview/PdfIndex.vue | 5 +++++ 1 file changed, 5 insertions(+) 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,