diff --git a/src/views/Home/PdfView/index.vue b/src/views/Home/PdfView/index.vue index 3c0aed3e14846f986b81ca48a4547f84a632def0..bdcbc2219513bd8c89041de44920c94454014985 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 105221dc740166cd22ca84c1e1867552e686700e..869ce6d4c1102c153c93d5aa1e1a73bba3e1d31e 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