对象合并参数
let record={
age:'111'
}
let res={
name:"1111"
}
let record1 = { ...record, id: 'mock_id', percent: 0, ...res };
console.log(record1); //{age: '111', id: 'mock_id', percent: 0, name: '111111'}
对象合并参数
let record={
age:'111'
}
let res={
name:"1111"
}
let record1 = { ...record, id: 'mock_id', percent: 0, ...res };
console.log(record1); //{age: '111', id: 'mock_id', percent: 0, name: '111111'}