vue 高度 动态更新计算 calcHeight watch $route

时间:2019-02-26 13:57:05   收藏:0   阅读:1329

vue 高度 动态更新计算

 calcHeight () {
      this.orgTreeHeight = window.innerHeight - 180
      // this.tableHeight = window.innerHeight - 210
      this.divHeight = window.innerHeight - 180
    }

  },
  mounted () {
    // console.info(‘jobOrgNum this‘, this)
    window.onresize = () => {
      this.calcHeight()
    }
  },
  watch: {
    $route (to, from) {
      this.calcHeight()
    }

 

原文:https://www.cnblogs.com/pengchenggang/p/10436398.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!