0๐
โ
Do you have access to n
in the function as below?
<div v-for="n in maxLength">
<input v-model='price.matrix_prices[n]' />
<div @click="fillPrices(n)">set all to this price
</div>
{{n}}
</div>
If yes write the function like this:
methods: {
fillPrices(n) {
var data = this.price.matrix_prices[n];
//do something with the data
}
}
Source:stackexchange.com