feat: use window.moment

This commit is contained in:
liufree 2025-04-16 22:20:57 +08:00
parent a789a53f8b
commit 3af8cd3f95
2 changed files with 1 additions and 3 deletions

View file

@ -14,7 +14,6 @@
"dependencies": {
"@ant-design/icons": "^5.0.1",
"@ant-design/pro-components": "^2.4.4",
"moment": "^2.30.1",
"umi-request": "^1.4.0"
},
"devDependencies": {

View file

@ -1,4 +1,3 @@
import moment from "moment";
export function formatValue(
value: Record<string, any>
@ -31,7 +30,7 @@ function formatObject(value: any) {
return {type: "link", path: value.path, display: value.display};
}
if ("ts" in value) {
const display= moment(value.ts).format("YYYY-MM-DD HH:mm:ss");
const display= window.moment(value.ts).format("YYYY-MM-DD HH:mm:ss");
return {type: "datetime", display: display};
}
}