window.addEventListener('resize', () => {
this.$nextTick(() => {
this.setHeight()
})
})
this.$once('hook:beforeDestroy', () => {
window.removeEventListener('resize', this.setHeight)
})
VUE中窗口监听与销毁
最新推荐文章于 2024-05-16 14:23:07 发布