I am trying to get the canvas element which is inside a template of a component, found great documentations for vuejs1 but not for vuejs2 where "ref" is the only w
i had the exact same issue, in my case i solved it by accessing the ref in the method that changes the v-if with nextTick.
methods: { open() { this.show = true; //v-if condition this.$nextTick(function() { this.titleWidth = this.$refs.titleBg.clientWidth - 30; }); }