diff --git a/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue b/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue index 9772291f..965c6cbe 100644 --- a/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue +++ b/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue @@ -297,7 +297,7 @@ function formatQuota(num: number | null | undefined): string { function getQuotaPercentage(used: number | null | undefined, limit: number | null | undefined) { if (limit == null || limit === 0 || used == null) return 0; - return Math.min((used / limit) * 100, 100); + return Number(Math.min((used / limit) * 100, 100).toFixed(2)); } // 获取配额状态颜色