record 对应的就是dataIndex的内容
render:(record)=>(
<span> {record.map((item,index)=>
<span key={item.groupId}>
{(index!==record.length-1)?item.groupName+" | " : item.groupName)} </span>)
)
效果 新建分组 | 新建分组2 | 新建分组3
这篇博客探讨了如何使用JavaScript在渲染过程中处理数据记录,特别是针对分组数据的展示。通过示例代码,展示了如何利用map函数遍历记录并创建分隔的分组名称列表,最终实现‘新建分组|新建分组2|新建分组3’这样的显示效果。
record 对应的就是dataIndex的内容
render:(record)=>(
<span> {record.map((item,index)=>
<span key={item.groupId}>
{(index!==record.length-1)?item.groupName+" | " : item.groupName)} </span>)
)
效果 新建分组 | 新建分组2 | 新建分组3
4164
4758

被折叠的 条评论
为什么被折叠?