let arr = [{a:'a1'},{a:'a2'},{a:'a3'}]
let arr2 = [{a:'a1',b:1},{a:'a2',b:2},{a:'a3',b:3}]
// 模拟点击删除,你点击了删除,能取出当前删除的index值,这里默认模拟点击后的取值index为2
let obj1 = arr[2]
let value1 = obj1.a
console.log(obj1,value1)
arr.splice(2,1)
let deleteID
arr2.map((item,index)=>{
Object.values(item)[0] == value1 ? deleteID = index : null
})
console.log(deleteID)
arr2.splice(deleteID,1)
console.log(arr,arr2)
测试结果
完美实现