mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 00:53:33 +00:00
feat: format numbers >= billion with k suffix
- Update formatNumber function to display numbers >= 1 billion with 'k' suffix - Example: 2,500,000,000 displays as '2,500,000k' for better readability - Improves token statistics display for large numbers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2488,7 +2488,11 @@ const app = createApp({
|
||||
// 格式化数字,添加千分符
|
||||
formatNumber(num) {
|
||||
if (num === null || num === undefined) return '0';
|
||||
return Number(num).toLocaleString();
|
||||
const number = Number(num);
|
||||
if (number >= 1000000000) {
|
||||
return (number / 1000).toLocaleString() + 'k';
|
||||
}
|
||||
return number.toLocaleString();
|
||||
},
|
||||
|
||||
// 格式化运行时间
|
||||
|
||||
Reference in New Issue
Block a user