环境变量增加更新时间排序

This commit is contained in:
whyour 2022-02-11 13:41:48 +08:00
parent a809b89bb0
commit baea40f157

View File

@ -149,6 +149,13 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
ellipsis: {
showTitle: false,
},
sorter: {
compare: (a: any, b: any) => {
const updatedAtA = new Date(a.updatedAt || a.timestamp).getTime();
const updatedAtB = new Date(b.updatedAt || b.timestamp).getTime();
return updatedAtA - updatedAtB;
},
},
render: (text: string, record: any) => {
const language = navigator.language || navigator.languages[0];
const time = record.updatedAt || record.timestamp;