data: {
personData:[100,200,300,400,500,600]
},
onLoad: function(options) {
this.Limit()
},
limit(){
var _this=this;
this.data.personData.forEach(item=>{
if (item>400) {
400
}
})
}
there is something I don"t quite understand when I just came into contact with WeChat Mini Programs, that is, I need to modify items greater than 400 in the above forEach. WeChat Mini Programs needs to call this.setData (), but gets the global content. How to use this to modify it as in js