vuejs获取div等元素的宽度和高度
在标签div,span中定义ref="barStyle"
//获取标签宽度
const barWidth = this.$refs.barStyle.clientWidth;
//获取标签高度
const barHeight = this.$refs.barStyle.clientHeight;
以上是编程学习网小编为您介绍的“vuejs获取div等元素的宽度和高度”的全面内容,想了解更多关于 vuejs 内容,请继续关注编程基础学习网。