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
In may case, I use v-for like:
v-for
And
//pubList is from ajax props: ['pubList'],
In this case, I solve this by:
watch: { 'pubList': { handler:function(newArray) { if(newArray.length===0){ return } this.$nextTick(function() { console.log(this.$refs.lazyImages) }) }, immediate:true } }