project.peopleList ({
) "projectId": that.id
}, function(data) {
console.log("data",data);
//
that.peopleLists = [];//push
for(var i = data.length - 1; i>=0; i--){
if(data[i].peopleId == that.currentPeople){
data.splice(i,1)
}else{
that.peopleLists.push(data[i]);
that.$emit("update:peopleLists",that.peopleLists)
}
}
})
The interface returns three pieces of data, but the printed result is as follows:
removing the for loop shows normal. If you want to know what causes this phenomenon, thank you