mirror of
https://github.com/liufree/obsidian-querydash.git
synced 2026-07-22 05:41:49 +00:00
feat: use window.moment
This commit is contained in:
parent
a789a53f8b
commit
3af8cd3f95
2 changed files with 1 additions and 3 deletions
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue