Commit d255bbb9 authored by miaojiale's avatar miaojiale

修复bug

parent cf743fab
...@@ -38,13 +38,6 @@ export default { ...@@ -38,13 +38,6 @@ export default {
timeout: null, timeout: null,
} }
}, },
watch: {
showPdf(v) {
if (v) {
this.loadPDF()
}
},
},
mounted() {}, mounted() {},
methods: { methods: {
loadPDF() { loadPDF() {
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
></el-pagination> ></el-pagination>
</div> </div>
</div> </div>
<!-- 自动提醒 --> <!-- 弹窗 -->
<el-dialog <el-dialog
custom-class="pdfDialog" custom-class="pdfDialog"
:title="''" :title="''"
...@@ -54,17 +54,14 @@ ...@@ -54,17 +54,14 @@
:close-on-press-escape="false" :close-on-press-escape="false"
:show-close="true" :show-close="true"
width="70%" width="70%"
:destroy-on-close="true"
top="10vh" top="10vh"
> >
<div class="innerBody"> <div class="innerBody">
<div class="title">{{ curPdf.articleTitle }}</div> <div class="title">{{ curPdf.articleTitle }}</div>
<div class="refuteList"> <div class="refuteList">
<!-- <pdf :src="pdfSrc"></pdf> --> <!-- <pdf :src="pdfSrc"></pdf> -->
<pdf-view <pdf-view ref="pdfView" :pdf-src="pdfSrc"></pdf-view>
ref="pdfView"
:pdf-src="pdfSrc"
:showPdf="showPdf"
></pdf-view>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
...@@ -101,7 +98,15 @@ export default { ...@@ -101,7 +98,15 @@ export default {
pdfSrc: "", pdfSrc: "",
} }
}, },
watch: {}, watch: {
showPdf(v) {
if (v) {
setTimeout(() => {
this.$refs.pdfView.loadPDF()
}, 250)
}
},
},
mounted() { mounted() {
if (this.$route.query.tabIndex) { if (this.$route.query.tabIndex) {
this.activeBar = this.$route.query.tabIndex this.activeBar = this.$route.query.tabIndex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment