vue获取元素的高度主要是利用vue的ref属性
<template>
<div ref="picWrapper"></div>
</template>
获取高度值:
const height = this.$refs.picWrapper.offsetHeight;
获取元素样式值:
const height = window.getComputedStyle(this.$refs.picWrapper).height;
获取元素内联样式值:
const height =this.$refs.picWrapper.style.height;