在dom渲染完成后想要获取该元素的高度时 发现为0 解决办法: 在这个生命周期里添加获取高度的代码 updated () { this.$nextTick(() => { this.contentHight = this.$refs.content.offsetHeight }) },