0👍
Work directly with the nested data and bind to the key
property for each item:
Template
<a v-for="type in types"
:key="type.type"
:class="[canAddNameType(type) ? '' : 'disabled', 'dropdown-item']" href="#">
@{{ type.type }}
</a>
Script
computed: {
types() {
return this.names.types
}
}
Source:stackexchange.com