All of the properties I add have a value, but there is still something that is not correct. I am trying to calculate the grand total by multiplying the price by the number of purchases, which is iterated through an array.
total () {
return this.items.reduce((total, item) => {
return total + item.qty * item.price
}, 0)
}
I try to change to composite api 118:12 error Parsing error: Missing semicolon. (48:12)
total () {
return items.reduce((total, item) => {
return total + item.qty.value * item.price.value
}, 0)
}
methodsobject in composition api, so it's unclear whytotal ()property is intact