<div class="top" ref="top">
mounted () {
let topHeight = this.$refs.top.offsetHeight // 头部高度
console.log(topHeight)
}
vueはdivの高さを取得します
おすすめ
転載: blog.csdn.net/yuyu_2019/article/details/112979108
ランキング