数据对象去重
// reduce() 方法接收一个函数 function(all,next){}
// all: 初始值, 或者计算结束后的返回值。
// next:当前元素(curr)
// reduce() 对于空数组是不会执行回调函数的
// some() 方法接收一个函数,方法用于检测数组中的元素 function(item){}
// item: 数组种当前子项, index,arr
// es6 解构运算符扩展: let all = [...all, next]
// let all = Object.assign({}, next);
computed: {
// arr.reduce()
// all.some(function(){},[])
// es6箭头函数
leaderListReduce () {
return this.leaderManagerList.reduce((all, next) => all.some((item) => item.nYggh == next.nYggh) ? all : [...all, next], [])
}
},