js 对象数组根据某个名称删除数组中的对象

Posted on 2020-06-28 10:31  zkx4213  阅读(2419)  评论(0)    收藏  举报
delArrayItem: function (array,item) {
const index = array.findIndex(text => text.name === item.name);
array.splice(index, 1);
},

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3