Commit ea71c849 authored by 毛线's avatar 毛线

优化

parent f319f492
......@@ -23,6 +23,7 @@ export default {
isMoblie: false,
scale: 1,
top: 0,
initTime: '',
}
},
computed: {
......@@ -50,7 +51,13 @@ export default {
}
// 监听横屏状态变化
window.addEventListener('onorientationchange' in window ? 'orientationchange' : 'resize', () => {
this.initSceen()
this.$nextTick(() => {
this.initSceen()
clearTimeout(this.initTime)
this.initTime = setTimeout(() => {
this.initSceen()
}, 500)
})
}, false)
},
methods: {
......
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