for循环TypeError: Cannot read property '0' of undefi
updata(e){
this.data.staffId=app.globalData.staffId
this.data.status=1
var dish=e.currentTarget.dataset.dishName
var tableId=+e.currentTarget.dataset.table
for (let i=0; i < this.data.length; i++) {
if(this.data.noticeList[i].dishName==dish&this.data.noticeList[i].table==tableId){
this.data.noticeList[i].status=1
console.log(this.data.noticeList[i].status)
break
}
}
this.hideModal(e)
},