1. var items = this.state.items;  
  2. items[i].status = 'doing';  
  3. this.setState({  
  4.       items: items  
  5. });  

//this.state.useLists[index].status === '10'?
  let items = this.state.useLists;
  items[index] === '10' ? items[index] = '20' : items[index] = '10';
  this.setState({
  useLists:items
});

相关文章:

  • 2022-12-23
  • 2021-11-15
  • 2021-07-21
  • 2022-12-23
  • 2022-01-13
  • 2021-12-19
  • 2022-12-23
猜你喜欢
  • 2021-11-21
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2022-03-08
  • 2022-12-23
相关资源
相似解决方案