From 847c2bd9d337e3ca7fd33923e7a8b6582ca12ea8 Mon Sep 17 00:00:00 2001 From: wxj Date: Tue, 30 Jun 2026 09:59:15 +0800 Subject: [PATCH] =?UTF-8?q?Token=20=E4=BD=BF=E7=94=A8=E8=B6=8B=E5=8A=BF=20?= =?UTF-8?q?X=20=E8=BD=B4=E6=A0=87=E7=AD=BE=E4=BB=8E=E6=98=9F=E6=9C=9F?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E5=85=B7=E4=BD=93=E6=97=A5=E6=9C=9F=EF=BC=88?= =?UTF-8?q?=E6=9C=88/=E6=97=A5=20=E6=A0=BC=E5=BC=8F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/dashboard/BentoTrend.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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)} ))}