0👍
you could utilize lodash#set
// component
this.$store.commit('MUTATE_FORMDATA_CONTACTS', {
path: 'account[0].personal[0].contacts[0]',
value: data
})
// while utilizing lodash#set in the store
// import {set} from 'lodash-es'
[MutationTypes.MUTATE_FORMDATA_CONTACTS](state, payload) {
set(state.form,payload.path,payload.data);
},
- [Vuejs]-Component inside v-for, Infinite update loop in a component render function
- [Vuejs]-Why function doesn't work with a button component but does with a button html tag in VUE js?
Source:stackexchange.com