[Vuejs]-Vue.js: How to read $index inside computed function?

2👍

You can’t.

This is what methods are for:

<a href v-bind:href="link($index)">{{item.message}}</a>

methods: { 
  link: function(index) {
    return f(index)
  }
}

Leave a comment