2👍
✅
You could use map
method and spread operator to add id
to the item
:
computed: {
links() {
return items.map((item,index)=>({id:index,...item}))
}
}
Source:stackexchange.com