export const select = (one, two) => {
const arr = []
one.forEach((item) => {
const idx = two.findIndex(term => {
// eslint-disable-next-line eqeqeq
if (item.id == term.id) {
return true
}
})
if (idx === -1) {
arr.push(item)
}
})
// 方法2(报错重复的键值,是因为后台数据的问题) // const arr = one.filter(function (one, two) {
// return one.id !== two.id
// })
return arr
}