diff --git a/web/src/components/dashboard/BentoTrend.jsx b/web/src/components/dashboard/BentoTrend.jsx index 26752d6..78e6b1e 100644 --- a/web/src/components/dashboard/BentoTrend.jsx +++ b/web/src/components/dashboard/BentoTrend.jsx @@ -22,7 +22,11 @@ import { TrendingUp } from 'lucide-react'; import Sparkline from './Sparkline'; import { renderQuota } from '../../helpers'; -const WEEKDAYS_SHORT = ['日', '一', '二', '三', '四', '五', '六']; +const formatMD = (d) => { + const m = d.getMonth() + 1; + const day = d.getDate(); + return `${m}/${day}`; +}; const BentoTrend = ({ dailyStats = [], @@ -81,9 +85,9 @@ const BentoTrend = ({ ? 'font-semibold text-slate-900 dark:text-white' : 'text-slate-300 dark:text-white/30' }`} - title={`周${WEEKDAYS_SHORT[d.date.getDay()]} ${d.count} 次`} + title={`${d.date.getMonth() + 1}月${d.date.getDate()}日 ${d.count} 次`} > - {WEEKDAYS_SHORT[d.date.getDay()]} + {formatMD(d.date)} ))}