mounted() { window.onresize = () => { return (() => { this.$nextTick(() => { if(document.documentElement.clientWidth <= 1000){ this.mode = "vertical" }else{ this.mode = "horizontal" } }) })() } }
标签:nextTick,vue,窗口,documentElement,document,监听 From: https://www.cnblogs.com/tlfe/p/17662893.html