0👍
✅
The variable needs to be declared beforehand (not in the same object):
export default {
data() {
const makEosComputer = 0
const makEosUserTotal = 0
const makArchComputer = 0
const makArchUserTotal = 0
const makDataComputer = 0
const makDataUserTotal = 0
return {
makEosComputer,
makEosUserTotal,
makArchComputer,
makArchUserTotal,
makDataComputer,
makDataUserTotal,
cards: [
{title: 'Eos Lab', comps: makEosComputer, users: makEosUserTotal},
{title: 'Arch Lab', comps: makArchComputer, users: makArchUserTotal},
{title: 'Data Comm Lab', comps: makDataComputer, users: makDataUserTotal}
],
}
}
}
Source:stackexchange.com