属性冲突会报错: 用父级的id拼接到子级的id上
const {onLoadProductListData} = this.props
onl oadProductListData(1,(res)=>{
res.payload.forEach(event=>{
event.eventAttribute.forEach(attr=>{
attr.id = `${event.id}_${attr.id}`
})
})
console.log(res.payload)
this.setState({
eventList: res.payload
})
<Table
rowKey='id'
pagination={false}
columns={columns}
rowSelection={rowSelection}
dataSource={this.state.eventList}
childrenColumnName ="eventAttribute"
indentSize={20}
scroll={{y:this.state.tableHeight, x:1300}}
/>