Ant Design for Table
业务问题描述:根据需求表格表头一个字段根据类别不同来确定是否显示


现有: columns = [
{
title: '序号',
dataIndex: 'lid',
width: 50,
key:'1'
},
{
title: '资料名称',
dataIndex:"name",
width:150,
key:'2'
},
{
title: '资料系列',
dataIndex: 'seriesName',
本文介绍了如何在Ant Design的Table组件中根据业务需求动态处理表头字段的显示。通过示例代码展示了四种不同的处理方式,包括使用fill方法、直接修改数组元素、使用slice方法以及JSON转换,来实现特定字段的显示或隐藏,从而适应不同类别下的表格展示需求。
业务问题描述:根据需求表格表头一个字段根据类别不同来确定是否显示


现有: columns = [
{
title: '序号',
dataIndex: 'lid',
width: 50,
key:'1'
},
{
title: '资料名称',
dataIndex:"name",
width:150,
key:'2'
},
{
title: '资料系列',
dataIndex: 'seriesName',
944
2330
710

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