|
@@ -11,14 +11,27 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
zoom: 1,
|
|
zoom: 1,
|
|
|
|
+ count: 0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
mounted() {
|
|
mounted() {
|
|
- setTimeout(() => {
|
|
|
|
- const dpi = this.$route.query.dpi || 1920;
|
|
|
|
- this.zoom = dpi / 1920;
|
|
|
|
- }, 3000);
|
|
|
|
|
|
+ this.setDpi();
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ methods: {
|
|
|
|
+ setDpi() {
|
|
|
|
+ if (this.count < 5) {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ const dpi = this.$route.query.dpi || 1920;
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.zoom = dpi / 1920;
|
|
|
|
+ });
|
|
|
|
+ this.count = this.count + 1;
|
|
|
|
+ this.setDpi();
|
|
|
|
+ }, this.count * 2000);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|