功能:完成表格排序功能

This commit is contained in:
Liu 宇阳
2024-11-11 14:26:04 +08:00
parent 20e69bb057
commit d78805f80c
5 changed files with 12 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ const WallPage = () => {
title: '名称',
dataIndex: 'name',
key: 'name',
fixed: 'left',
fixed: 'left'
},
{
title: '内容',
@@ -81,6 +81,8 @@ const WallPage = () => {
dataIndex: 'createTime',
key: 'createTime',
render: (date: string) => dayjs(+date).format('YYYY-MM-DD HH:mm:ss'),
defaultSortOrder: 'descend',
sorter: (a: Wall, b: Wall) => +a.createTime! - +b.createTime!
},
{
title: '操作',