mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-13 20:30:48 +08:00
环境变量增加更新时间排序
This commit is contained in:
Vendored
+7
@@ -149,6 +149,13 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
|
|||||||
ellipsis: {
|
ellipsis: {
|
||||||
showTitle: false,
|
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) => {
|
render: (text: string, record: any) => {
|
||||||
const language = navigator.language || navigator.languages[0];
|
const language = navigator.language || navigator.languages[0];
|
||||||
const time = record.updatedAt || record.timestamp;
|
const time = record.updatedAt || record.timestamp;
|
||||||
|
|||||||
Reference in New Issue
Block a user