Vue gets the height of an element, the height obtained by the v-for loop or the height of the picture is auto

 Contant is the class of the element that wants to get the height

let heights = document.getElementsByClassName('contant')[0].clientHeight
console.log(heights)

Guess you like

Origin blog.csdn.net/stars______/article/details/129883463