1、 Object.assign,合并成新的对象 formData.data = Object.assign({}, toRaw(props.rowData)); 2、Object.keys ,循环对象的key属性 Object.keys(enumObj).forEach((key) => { if (enumObj[key].value == value) { desc = enumObj[key].desc; return false; //跳出循环 } }); 3、forEach,返回值是undefined,无返回值 checkBoxSelection.value.forEach((item) => { item.Type = item.Type.toString(); item.State = item.State.toString(); }); 4、map,返回处理后的新数组,重新new了个数组 let data = checkBoxSelection.value.map((item) => { item.Type = item.Type.toString(); return item; }); 标签:map,Object,value,item,forEach,array,Type From: https://www.cnblogs.com/nfmc/p/16654846.html