diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx index 130b3c62..d82da79e 100644 --- a/src/pages/crontab/index.tsx +++ b/src/pages/crontab/index.tsx @@ -69,6 +69,10 @@ const Crontab = () => { render: (text: string, record: any) => ( {record.name || record._id} ), + sorter: { + compare: (a: any, b: any) => a.name.localeCompare(b.name), + multiple: 2, + }, }, { title: '任务', @@ -90,12 +94,20 @@ const Crontab = () => { ); }, + sorter: { + compare: (a: any, b: any) => a.command.localeCompare(b.command), + multiple: 3, + }, }, { title: '任务定时', dataIndex: 'schedule', key: 'schedule', align: 'center' as const, + sorter: { + compare: (a: any, b: any) => a.schedule.localeCompare(b.schedule), + multiple: 1, + }, }, { title: '状态', diff --git a/src/pages/env/index.tsx b/src/pages/env/index.tsx index edf9e580..0e47b40c 100644 --- a/src/pages/env/index.tsx +++ b/src/pages/env/index.tsx @@ -119,6 +119,7 @@ const Env = () => { dataIndex: 'name', key: 'name', align: 'center' as const, + sorter: (a: any, b: any) => a.name.localeCompare(b.name), }, { title: '值',