How to use this.$set to update objects in vuex?

what if mutations uses this.$set to update state object data directly in a separate js file and will report an error this.$set is not a function ?

data in state

articleList: [
    {
      userinfo: {image: "static/img/3.jpeg", nickname: "eee", text: "", time: ""},
      content: {href: "2222222", text: "test", create_time: "", updata_time: ""},
      pic: [{path: "static/img/0.jpg"}, {path: "static/img/0.jpg"}, {path: "static/img/0.jpg"}],
      likebar: {hot: 555, status: false, comments: 666},
      isFollow: true
    }
  ]

component triggers action
this.$store.dispatch ("getLists")

action.js

getLists (val) {
    api.articleList().then((res) => {
      val.commit("updateList", res)
    })
}

mutations.js

updateList (state, data) {
    this.$set(this.state.articleList, 0, data)  //
    this.state.articleList = data //
}
May.09,2022

:

updateList (state, data) {
    state.articleList[0] = data;
    state.articleList = JSON.parse(JSON.stringify(state.articleList));
}

applies to both arrays and objects

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-1b30b5f-2b282.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-1b30b5f-2b282.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?