react useState 状态更新失败
以下是我更新失败的代码定义的hook状态const [productList, setProductList] = useState([]);点击事件,改变数据中enable字段const onEnable = (row,index) => { const list = productList; list[index].enable = !list[index].enable; setProductList(list); console.log('o
原创
2021-04-22 19:27:58 ·
2345 阅读 ·
1 评论