let showBuilderList:[
{id:0,name:'否'},
{id:1,name:'是'}
];
let newArr = []; //定义一个新数组来接受
showBuilderList.map(item => {
newArr.push({
key:item.id, // 改变id
value:item.name, //改变name
})
})
let showBuilderList:[
{id:0,name:'否'},
{id:1,name:'是'}
];
let newArr = []; //定义一个新数组来接受
showBuilderList.map(item => {
newArr.push({
key:item.id, // 改变id
value:item.name, //改变name
})
})
>