react-antd-Table相似表格不同字段处理

1、当两个表格字段相似时,但有一两个字段不同,我们可以将不同的字段单独以对象的形式抽出,根据情况push进去即可。
2、
代码参考

   const change =  
      {
    
    
        title: '操作',
        dataIndex: 'operate',
        key: 'operate',
        width: '15%',
        align: 'center',
        render: (text, record) => {
    
    
          return (
            <span>
     
            </span>
          );
        },
      }
    if () {
    
    
      columns.push(change);
    }

猜你喜欢

转载自blog.csdn.net/weixin_45416217/article/details/106767716
今日推荐