diff --git a/core/frontend/src/routes/account.tsx b/core/frontend/src/routes/account.tsx index 6c0313b..9dfbbb3 100644 --- a/core/frontend/src/routes/account.tsx +++ b/core/frontend/src/routes/account.tsx @@ -177,6 +177,7 @@ export function AccountPage({ billing, projects, team, onRecharge }: { const selectedCard = RECHARGE.find((item) => item.amt === recharge); const effectiveAmount = Number(customAmt) > 0 ? Number(customAmt) : recharge; const effectiveBonus = Number(customAmt) > 0 ? 0 : selectedCard?.bonusAmt || 0; + const setCustomIntegerAmount = (value: string) => setCustomAmt(value.replace(/\D/g, "").replace(/^0+/, "")); async function submitRecharge() { if (effectiveAmount <= 0) return; @@ -318,7 +319,7 @@ export function AccountPage({ billing, projects, team, onRecharge }: {
自定义金额
- setCustomAmt(event.target.value)} /> + setCustomIntegerAmount(event.target.value)} />