js 对象数组删除和查找的方法

deleteItem: function (array,item) {
const index = this.array.findIndex(text => text.name === item.name);
this.array.splice(index, 1);

亲测vue 中可用

原文地址:https://www.cnblogs.com/llcdbk/p/10653191.html