let dataSource=[
{
id: "0",
userName: "Jack",
sex: "1",
state: "1",
interest: "1",
birthday: "2018-1-1",
address: "",
time:"19:35",
},
{
id: "1",
userName: "daoma",
sex: "1",
state: "1",
interest: "1",
birthday: "2018-1-1",
address: "",
time:"19:35",
},
{
id: "2",
userName: "wawa",
sex: "1",
state: "1",
interest: "1",
birthday: "2018-1-1",
address: "",
time:"19:35",
},
]
console.log("1",dataSource)
dataSource.map((item,index)=>{
item.key = index
})
console.log("2",dataSource)
result: