The vuex mutations update data is written in spread (...). Why didn't the view update be triggered?

vuex

const list = {
  state: {
    list: []
  },
  mutations: {
    update: (state, e) => {
      for (let i = 0; i < state.list.length; iPP) {
        // 
        // state.list[i] = { ...e, ...state.list[i] }
        for (const ii in e) {
          state.list[i][ii] = e[ii]
        }
      }
    }
  }
}

export default list

state.list is originally an empty array, state.list [I] can assign values,
but if state.list [I] is empty, state.listi = e [ii] directly;
will not find the ii' attribute corresponding to state.list [I], state.list [I] has not been defined and its memory space has not been allocated.
should state.list [I] = {} first. Then assign the value, or directly use the subject state.list [I] = {... e,... state.list [I]} literally.


you use Vue.set (state.list,i, {... eMagne.state.list [I]}).

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-15cf1f1-16053.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-15cf1f1-16053.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?