const columns = [
{
title: "序号",
dataIndex: "Index",
width: 50,
align: "center",
customRender: ({ text, record, index }) => {
return `${(current.value - 1) * pageSize.value + index + 1}`;
},
},
{
title: "名称",
dataIndex: "name",
width: 100, // 设置了却不起效果
key: "name",
},
]
解决
// 加入 tableLayout="fixed" 即可
<a-table
tableLayout="fixed"
>