This commit is contained in:
SunCheng
2026-02-15 10:10:28 +08:00
parent e51a3edd50
commit a88556c784
92 changed files with 6751 additions and 776 deletions

View File

@@ -24,10 +24,7 @@ export const formatDate = (date, format = 'YYYY-MM-DD') => {
const month = String(d.getMonth() + 1).padStart(2, '0')
const day = String(d.getDate()).padStart(2, '0')
return format
.replace('YYYY', year)
.replace('MM', month)
.replace('DD', day)
return format.replace('YYYY', year).replace('MM', month).replace('DD', day)
}
/**
@@ -41,4 +38,4 @@ export const formatPercent = (value, decimals = 1) => {
return '0%'
}
return `${Number(value).toFixed(decimals)}%`
}
}