for (const item of this.duplicateRemoval) {
if (item.user_id === sendData['user_id']) {
this.$Message.success('请勿重复添加')
return
}
}
重点:
for...in 循环出的是 key,for...of 循环出的是 value
for...of 不能循环普通的对象,需要通过和 Object.keys()搭配使用