vue 获取页面高度

mounted(){

  window.onresize = () => {
    return (() => {
      window.fullHeight = //获取到的高度 document.documentElement.clientHeight;
    })()
  };
}
  获取当前盒子坐标 宽度
 let  box =  document.documentElement('***')
  ***.getBoundingClientRect()  
  API : .top .bottom .left .right 
posted @ 2020-11-30 15:59  web格调  阅读(9293)  评论(0编辑  收藏  举报