Vuex uses different variables to store the same arr data, one of which changes, and the other changes accordingly.

problem description

let arr = [
    {
        id: 100112,
        age: 10,
        name: tony
    }, {
        id: 100113,
        age: 12,
        name: Kevin
    }]

    arr commit  statename1, name2)
    name1[0].age
    name2[0].age

the environmental background of the problems and what methods you have tried

arr,commitname1
slice(0), concatarrcommitname2

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

name1 name2
May.22,2021

use JSON to process the original data to be copied

var name1 = JSON.parse(JSON.stringify(arr))
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-1e50cee-450df.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-1e50cee-450df.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?