互换的青春
试试这个class Foo{ constructor(){ this.arr_select=[3,1,2,6,8,10,5]; this.tableData=[{id:12},{id:2},{id:10},{id:1},{id:3},{id:5},{id:4}] } delAll(){ this.tableData=this.tableData.filter(j=>!this.arr_select.find(v=>v===j.id,this)) }}let foo = new Foo();foo.delAll();console.log(foo.tableData)