|
|
@@ -12,7 +12,8 @@
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
<el-col :span="20">
|
|
|
- <pdf-viewer></pdf-viewer>
|
|
|
+ <div>
|
|
|
+ <pdf-viewer v-if="renderComponent"></pdf-viewer></div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
@@ -37,6 +38,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ renderComponent: true,
|
|
|
//fileUrl: "https://seec-portal.oss-cn-hangzhou.aliyuncs.com/1/07-%E9%9C%80%E6%B1%82%E6%96%87%E6%A1%A3%E5%8C%96%E4%B8%8E%E9%AA%8C%E8%AF%81.pdf",
|
|
|
};
|
|
|
},
|
|
|
@@ -117,6 +119,12 @@
|
|
|
let href = URL.createObjectURL(blob);
|
|
|
console.log(href);
|
|
|
this.$store.commit(SET_SRC, { src: href });
|
|
|
+ this.renderComponent = false;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ // 在 DOM 中添加 my-component 组件
|
|
|
+ console.log(1);
|
|
|
+ this.renderComponent = true;
|
|
|
+ });
|
|
|
});
|
|
|
});
|
|
|
},
|