fix🛠️: 统一date格式

This commit is contained in:
clz 2022-09-06 01:18:19 +08:00
parent 48cef548c5
commit 0afc4b5e44
3 changed files with 5 additions and 3 deletions

View File

@ -16,7 +16,7 @@
"@nextui-org/react": "^1.0.0-beta.9",
"antd": "^4.22.8",
"axios": "^0.27.2",
"dayjs": "^1.11.4",
"dayjs": "^1.11.5",
"echarts": "^5.3.3",
"mobx": "^6.6.1",
"mobx-react-lite": "^3.4.0",

View File

@ -1,3 +1,5 @@
import * as dayjs from 'dayjs'
export enum BillType {
consume = 0,
income,
@ -17,7 +19,7 @@ export interface IBill {
export function EmptyBill(): IBill {
const now = new Date();
return {
date: `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`,
date: dayjs().format("YYYY-MM-DD"),
money: 0,
type: BillType.consume,
cls: "",

View File

@ -1522,7 +1522,7 @@ date-fns@2.x:
resolved "https://registry.npmmirror.com/date-fns/-/date-fns-2.29.2.tgz#0d4b3d0f3dff0f920820a070920f0d9662c51931"
integrity sha512-0VNbwmWJDS/G3ySwFSJA3ayhbURMTJLtwM2DTxf9CWondCnh6DTNlO9JgRSq6ibf4eD0lfMJNBxUdEAHHix+bA==
dayjs@1.x, dayjs@^1.11.4:
dayjs@1.x, dayjs@^1.11.5:
version "1.11.5"
resolved "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.5.tgz#00e8cc627f231f9499c19b38af49f56dc0ac5e93"
integrity sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA==