v-for="" :key="contact.id"
methods: {
deleteСontact(index) {
const Index = contacts.findIndex(t => t.id === id)
this.$delete(this.contacts, Index)
}
},
actions: {
deleteContact({commit}, id) {
commit('deleteContact', id)
},
}
mutations: {
deleteСontact(state, id) {
const idx = contacts.findIndex(t => t.id === id);
localStorage.removeItem(state.contacts[idx])
},
}