[Vuejs]-Can't access data in getter when binding by v-if but can access when rendered by v-for in Vue

0👍

Error seems in this particular code to me, You can not have (item, key, index) with v-for with an array of objects, that syntax is only available with object, see the fiddle.

so You need something like following:

<tr v-for="row in rows" v-bind:class="rowClass(row)">
  <td v-for="(item, index) in row.columns" v-bind:class="classy(index)">{{item}}</td>
</tr>

Leave a comment