vue 获取 div 高度

// 常规模型 var height = this.$refs.jo.offsetHeight; // 获取元素样式值,element 为元素ref="jo" var heightCss = window.getComputedStyle(this.$refs.jo).height; // 100px // 获取元素内联样式值 var heightStyle =this.$refs.jo.style.height; // 100px this.$nextTick(() => { console.log(this.$refs.gos.offsetHight); })

 

 

 

 

 

 

 

 

 

 

 

 

相关阅读:

https://www.jianshu.com/p/ca98a4cecfb9

https://www.jianshu.com/p/434d55e86ab9

你可能感兴趣的:(vue)