vue项目项目中在mountd里面获取视图的高度
mounted() {
const that = this
window.onresize = () => {
return (() => {
window.screenHeight= document.body.clientHeight
that.screenHeight= window.screenHeight
})()
}
},