去除两个数组里面相同的id数据
"""
let arr1= [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }, { id: 5 }]
let arr2= [{ id: 1 }, { id: 2 }, { id: 3 }]
de_weight(leftData, rightData) {
this.leftData = leftData.filter(item => {
const List = rightData.map(v => v.id)
return !List.includes(item.id)
})
}
在vue中使用Swiper如果new 了两个Swiper 记得要在第二个Swiper 上面清除第一个Swiper
this.upsSwiper.destroy(true)
"""
网友评论