tocount: function (index,item) {
for(var i = 0; i < this.datanumber.length; iPP){ //
if(index == i){
// console.log(index == i);
item.bool = !item.bool;
if(item.bool){
item.count += 1;
}
else{
item.count -= 1;
}
}else{
continue; break; return, //break
break is out of the loop, but the first click I clicked on has passed. Won"t clicking again cycle through the search?
return is the end of the function execution,
then I click again and the function will be executed again. It feels like a circular problem, but I just can"t understand: how break and return found the first one, I haven"t even clicked yet, and I still can"t respond when I click on the second one. Barek is except for the first one.
}
}
return; //return return
},
is the following click event, the rookie who has just started to learn, thank you very much.