this.setData is not a function
发布于 5 年前 作者 jinyang 5468 次浏览 来自 问答

bindPickerChange:function(event){

var index = event.detail.value;

var selectedCount = this.data.countsArray[index];

this.setData({

productCount:selectedCount

});

},

我这里使用了picker组件,绑定的是上面的事件,在选择value后点确定就会出现 this.setData is not a function

有没有朋友帮忙看一下

1 回复

let that = this

凡是出这种错误提示的时候,我都是这样解决的。

回到顶部