我想请问为什么我的forEach函数会报错,提示我is not a function?
selectAll:function () {
    this.checkAllFlag = !this.checkAllFlag;
    if(this.checkAllFlag){
        this.productList.forEach(function (item,index) {
            if(typeof item.checked == 'undefined'){
                Vue.set(item,'checked',true);
            }else{
                item.checked = true;
            }
        })
    }
}

 
                             
                             
                            