my code has bug, and then I checked to write = = as =
.
A [1,2,3,4,5,6,7]
B [2,3,4]
after deletion
A [1,5,6,7]
this.selectRightTableData.forEach(item => {
this.rightTableData.splice(this.rightTableData.findIndex(v => v.id = item.id), 1)
})
after repair, judge according to an attribute of the object; whether it is the same
this.selectRightTableData.forEach(item => {
this.rightTableData.splice(this.rightTableData.findIndex(v => v.id == item.id), 1)
})
judge by memory address
this.selectLeftTableData.forEach(item => {
this.leftTableData.splice(this.leftTableData.indexOf(item), 1)
})