How to get offsetHeight of an element by REF

0

I've been trying for a few hours without success, get some specific element data, this ref is part of a v-for so I'll dynamically query the position of it, what can I have done wrong?

var ref = 'ln3';
alert(this.$refs.ref.$el.offsetHeight);


    <tr v-for="(produto, index) in buscar_prod" 
    v-bind:class="[index == sel_prod ? 'highlight' : '']"  :ref="'ln' + index" v-on:click.stop.prevent="seleciona_produto_click(index)">
    <td class="center">{{ produto.cod_prod }}</td>
    <td class="left">{{ produto.nome_prod }}</td>               
    <td class="align-right">{{ produto.quant_prod }}</td>
    <td class="align-right">{{ produto.un_prod }}</td>
    <td class="align-right">{{ produto.valor_venda_prod }}</td>
  </tr>
    
asked by anonymous 04.10.2018 / 16:42

0 answers