<div id="app">
<div class="box" ref="infoBox">
  width: {{width}}, height: {{height}}
</div>
  </div>
.box{
  width: 50%;
  height: 50vh;
  background: pink;
}
let app=new Vue({
  el: "#app",
  data: {
    width:0,
    height:0
  },
  mounted() {
    this.width=this.$refs.infoBox.clientWidth;
    this.height=this.$refs.infoBox.clientHeight;
  }
})

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.11/vue.min.js