[Vuejs]-In VueJs offsetHeight is 0 after mounted

0👍

That’s not a Vue error, it’s because you have floated your div which removes it from the page flow, so this.$el has no height. Here’s your JSFiddle without the float, which returns the correct height:

https://jsfiddle.net/zey5eL5v/12/

and here it is if you add overflow:auto; to your app css:
https://jsfiddle.net/zey5eL5v/14/

Leave a comment