list = [2,4];
this.pageList = [{fileId: 1}, {fileId: 2}, {fileId: 3}, {fileId: 4}]
複製程式碼
list.forEach(m => {
this.pageList.forEach((m2, i2, arr) => {
if (m2.fileId === m) {
arr.splice(i2, 1)
}
})
})
複製程式碼
list = [2,4];
this.pageList = [{fileId: 1}, {fileId: 2}, {fileId: 3}, {fileId: 4}]
複製程式碼
list.forEach(m => {
this.pageList.forEach((m2, i2, arr) => {
if (m2.fileId === m) {
arr.splice(i2, 1)
}
})
})
複製程式碼