From d255bbb9ae285bf163ea5cef4814c83353ab1139 Mon Sep 17 00:00:00 2001 From: miaojiale <1123971748@qq.com> Date: Wed, 1 Mar 2023 15:08:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Home/PdfView/index.vue | 7 ------- src/views/Home/ScientificResearch/index.vue | 19 ++++++++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/views/Home/PdfView/index.vue b/src/views/Home/PdfView/index.vue index 3c0aed3..bdcbc22 100644 --- a/src/views/Home/PdfView/index.vue +++ b/src/views/Home/PdfView/index.vue @@ -38,13 +38,6 @@ export default { timeout: null, } }, - watch: { - showPdf(v) { - if (v) { - this.loadPDF() - } - }, - }, mounted() {}, methods: { loadPDF() { diff --git a/src/views/Home/ScientificResearch/index.vue b/src/views/Home/ScientificResearch/index.vue index 105221d..869ce6d 100644 --- a/src/views/Home/ScientificResearch/index.vue +++ b/src/views/Home/ScientificResearch/index.vue @@ -45,7 +45,7 @@ > - +
{{ curPdf.articleTitle }}
- +
@@ -101,7 +98,15 @@ export default { pdfSrc: "", } }, - watch: {}, + watch: { + showPdf(v) { + if (v) { + setTimeout(() => { + this.$refs.pdfView.loadPDF() + }, 250) + } + }, + }, mounted() { if (this.$route.query.tabIndex) { this.activeBar = this.$route.query.tabIndex -- 2.22.0