antd table 怎样让一列数据不显示
发布网友
发布时间:2023-03-06 12:03
我来回答
共1个回答
热心网友
时间:2024-01-20 18:53
const columns = [
{
title: 'id',
dataIndex: 'id',
key: 'id',
colSpan:0,
render:()=>{return {props:{colSpan:0}};}
},
{
title: '操作',
key: 'action',
render: (text: any, record: any) => (
<Space size="middle">
<Button onClick={()=>{EditLecture(record)}}>修改</Button>
<Popconfirm title="确定删除这节课吗?" okText="确定" cancelText="取消" onConfirm={() => { deleteLecture(record) }}><Button>删除</Button></Popconfirm>
</Space>
),
},
];
重点:colSpan:0, render:()=>{return {props:{colSpan:0}};}