var materielArr = []; //创建数组
var materiel = {}; //创建对象
//添加到数组
materiel.cInvCode = cInvCode;
materiel.quantity = quantity;
materiel.orderType = orderType;
materielArr.push(materiel);
//删除指定对象
materiel.cInvCode = cInvCode;
materiel.quantity = quantity;
materiel.orderType = orderType;
materielArr = materielArr.filter((item)=>item.cInvCode!=cInvCode);
标签:cInvCode,materiel,orderType,创建对象,js,数组,materielArr,quantity From: https://www.cnblogs.com/wl0813/p/16742172.html