|
@@ -30,17 +30,6 @@ export default {
|
|
|
components: {
|
|
|
pdf,
|
|
|
},
|
|
|
- watch: {
|
|
|
- pdfUrl(newValue, oldValue) {
|
|
|
- this.loading = this.$loading.service({
|
|
|
- background: "rgba(255, 255, 255, 0.7)",
|
|
|
- target: document.querySelector(".pdf"),
|
|
|
- });
|
|
|
- this.numPages = 0;
|
|
|
- this.src = null;
|
|
|
- this.reportPreview();
|
|
|
- },
|
|
|
- },
|
|
|
data() {
|
|
|
return {
|
|
|
// 总页数
|
|
@@ -73,6 +62,18 @@ export default {
|
|
|
}
|
|
|
this.$emit("getPageTotal", val);
|
|
|
},
|
|
|
+ pdfUrl(newValue, oldValue) {
|
|
|
+ if(this.loading){
|
|
|
+ this.loading.close();
|
|
|
+ }
|
|
|
+ this.loading = this.$loading.service({
|
|
|
+ background: "rgba(255, 255, 255, 0.7)",
|
|
|
+ target: document.querySelector(".pdf"),
|
|
|
+ });
|
|
|
+ this.numPages = 0;
|
|
|
+ this.src = null;
|
|
|
+ this.reportPreview();
|
|
|
+ },
|
|
|
},
|
|
|
computed: {},
|
|
|
created() {},
|