Commit a2197840 by zhangyongfeng

reportWindowSize

parent 0fe43ead
...@@ -247,8 +247,19 @@ export default { ...@@ -247,8 +247,19 @@ export default {
setTimeout(() => { setTimeout(() => {
this.getPhoto(); this.getPhoto();
}, 1000); }, 1000);
window.addEventListener('resize', this.reportWindowSize);
},
beforeDestroy() {
window.removeEventListener('resize', this.reportWindowSize);
}, },
methods: { methods: {
reportWindowSize() {
const AppCanvas = this.$el.querySelector('#rootcanvas');
if (AppCanvas.parentElement) {
AppCanvas.parentElement.removeChild(AppCanvas);
}
this.startTagCanvas();
},
playHandler() { playHandler() {
this.audioPlaying = true; this.audioPlaying = true;
}, },
......
...@@ -331,7 +331,6 @@ export default { ...@@ -331,7 +331,6 @@ export default {
#tool { #tool {
position: fixed; position: fixed;
width: 60px; width: 60px;
height: 500px;
top: 50%; top: 50%;
right: 20px; right: 20px;
transform: translateY(-50%); transform: translateY(-50%);
......
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