小程序--删除数组中的一个对象后,对应的节点怎么删除?

一、删除数组中的一个对象后,对应的节点怎么删除?
删除后,需要页面更新,需要setData一下

if(cnumber==0){
    
          
   this.data.orderList.splice(cindex,1); //当减为0的时候删除该项内容  
   this.setData({
    
            
    orderList:this.data.orderList      
   })    
}

猜你喜欢

转载自blog.csdn.net/huang_jimei/article/details/106858815
今日推荐