Nuxtjs /Vuex is not working with complex objects


4 weeks ago


5 time


I am receiving the following message when I try to change the value in my form, works for simple object though.

[vuex] do not mutate vuex store state outside mutation handlers.

I have a list and I need to update a register in this list, so pops up a dialogue modal populated and a need to change or not the fields and I click and save summit the alterations and in case I close the modal without save the changes, the values must be the same as before.

My form

<v-layout wrap>
 <v-flex xs12 sm6 md4>
 <v-text-field  v-model="" label="Name"></v-text-field>
<v-flex xs12 sm6 md4>
<v-text-field v-model="" label="Email"></v-text-field>
export default {
  name: "TheDealerPersonnel",
  components: { TheContentTitle },

  data: () => ({
    title: "Dealer Personnel",
    dialog: false,
    options: [],
    editedItem: {
      perosonneldealershipid: Number,
      dealerID: Number,
      personnelID: Number,
      dealer: Object,
      personnel: {
        personnelID: Number,
        name: String,
        email: String,
        companyID: Number,
        roleiD: Number,
        company: Object,
        role: {
          roleiD: Number,
          description: String,
          ranking: Number

0 answers