// 判断数组是否有相同的值
export function arrTest(arr,key){
const ids = arr.map(value=>value[key]);
const idsSet = new Set(ids);
if(idsSet.size == ids.length){
// console.log("“不存在同个值”")
return false
}else{
// console.log("“存在同个值”")
return true
}
}
// 判断数组是否有相同的值
export function arrTest(arr,key){
const ids = arr.map(value=>value[key]);
const idsSet = new Set(ids);
if(idsSet.size == ids.length){
// console.log("“不存在同个值”")
return false
}else{
// console.log("“存在同个值”")
return true
}
}