# antd table组件 勾选的时候全部勾选的问题 (key)
bug :点击一项,但是还是会全部勾选,
形成原因:每一项缺少key
const factoryRes = http.get("/api/mes/GetMatClassData", param, headers);
factoryRes.then((res) => {
const data = res.data.Data;
data.forEach(item => {
item.key =uuid()
});
setFactoryArr(data);
});
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8