.map 给数组对象添加新属性
let menuList = [
{name:'晓明',age:18},
{name:'黎明',age:20},
{name:'德华',age:28},
]
const list = this.list.map((item) => ({ ...item, title: `新属性1`, productName: '新属性2', income: '新属性3' }))
//
let menuList = [
{name:'晓明',age:18},
{name:'黎明',age:20},
{name:'德华',age:28},
]
const list = this.list.map((item) => ({ ...item, title: `新属性1`, productName: '新属性2', income: '新属性3' }))
//