一、删除数组中的一个对象后,对应的节点怎么删除?
删除后,需要页面更新,需要setData一下
if(cnumber==0){
this.data.orderList.splice(cindex,1); //当减为0的时候删除该项内容
this.setData({
orderList:this.data.orderList
})
}
一、删除数组中的一个对象后,对应的节点怎么删除?
删除后,需要页面更新,需要setData一下
if(cnumber==0){
this.data.orderList.splice(cindex,1); //当减为0的时候删除该项内容
this.setData({
orderList:this.data.orderList
})
}