Merge two arrays in vue to switch routes and render repeatedly

use merging two arrays in vue to switch routes and render repeatedly

sources of topics and their own ideas

related codes

the first step is to get the data in the background and submit it to Store using vuex to merge the original data
let data = [

{
    name:"",
    id:"123"
}

]
this.$store.commit ("setYyuedata", data);

the second step is to merge the two data and render to the front
export default new Vuex.Store ({
state: {

)
yuyuedata:[],

},
getters: {

getYuyuedata: state => state.yuyuedata,

},
mutations: {

//
setYyuedata(state, data){
  state.yuyuedata = state.yuyuedata.concat(data);
}

}
})

part III, front end with new data
(1). Get state data
computed: {

        ...mapGetters([
            "getYuyuedata"
        ])

}
(2). Render to the page

< table > < / table > (3) The data is duplicated when switching routes. -sharp-sharp-sharp, what are you looking for? What is the error message actually seen? clipboard.pngclipboard.png
Dec.06,2021

should you use concat to assign the array directly when rendering? otherwise, if you enter the vuex twice and the data is not cleared, of course you will repeat it

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