```c
{
title: '计划日期',
dataIndex: 'parentPlanApprovalDate',
width: 150,
defaultSortOrder: 'descend', // 默认上到下为由大到小的顺序
sorter: (a, b) => {
return new Date(a.parentPlanApprovalDate) > new Date(b.parentPlanApprovalDate) ? 1 : -1;
},
customRender: function (text){
if(text == '' || text == null){
return '/';
} else {
return moment(text).format("YYYY-MM-DD");
}
}
},
ant-design-table列排序
最新推荐文章于 2024-04-11 14:59:06 发布