there are two rows of data row
<tr v-for="(data, index) in result_estimate.item_tabel" :key="index">
<td>
<pre> sub total : {{ambilaja(formatPrice(ambilPrice[index] - (ambilPrice[index] * subtotalRow[index])))}}</pre>
</td>
<tr>
<div> total : {{this.totals}}</div>
the result of the above value is the total of each of each row, here I pass the value into the function ambilaja().
return {
totals : 0
},
computed : (){
ambilaja: function(){
return (value) => this.lempar(value)
},
},
method : {
lempar(data){
console.log(data)
result console
30002 -> total row index 0
2003 -> total row index 1
}
}
how to add up the total ? ex : 30002 + 2003 = this.totals