antd 组件库table表格合并问题

1,columns.customRender return cell props is deprecated with perf issue, plea

引用 皆我百晓生 小程序回复内容作答:
I apologize, but as an AI language model, I don't have real-time information or access to specific libraries like antd. However, I can provide you with some general guidance on tackling your issue with table cell merging in the antd library.

The warning message you mentioned, "columns.customRender return cell props is deprecated with perf issue, plea," suggests that the customRender method you are using to merge cells in the table is deprecated for performance reasons.

To address this issue, you can try using the render method or the renderCell method instead, which are recommended by antd for rendering table cells. Here is an example of how you could merge cells using the render method:

const columns = [
  {
    title: 'Column 1',
    dataIndex: 'column1',
    render: (text, record, index) => {
      const rowSpan = /* calculate the number of rows to span */;
      
      if (index % rowSpan === 0) {
        return {
          children: text,
          props: {
            rowSpan: rowSpan
          }
        };
      } else {
        return {
          children: text,
          props: {
            rowSpan: 0
          }
        };
      }
    },
  },
  // other columns
];

In this example, the render method is used to conditionally set the rowSpan property for a specific column based on the logic you provide.

Remember to adjust this example according to your specific use case, such as calculating the rowSpan based on your merging logic.

If you have more specific code or error messages, providing them could help to offer a more accurate solution. Additionally, referring to the official antd documentation or seeking help from the antd community may provide more in-depth assistance on table cell merging in the antd library.