refactor: 拆分CloudBilling.tsx(663→467行)提取BillingRecordDialog+BillingRuleDialog子模块

This commit is contained in:
attacker committed 2026-06-16 19:09:13 +08:00
1 parent f865d41547
commit accbfb53c3
4 files changed
+340 -220

No files matched your search

@@ -1,6 +1,24 @@
import { type ReactNode } from 'react';
import { TrendingUp, TrendingDown } from 'lucide-react';
// 云厂商中文标签(主组件 + 弹窗共享) // Logan.Li
export const providerLabels: Record<string, string> = {
aliyun: '阿里云',
tencent: '腾讯云',
aws: 'AWS',
huawei: '华为云',
azure: 'Azure',
};
// 云厂商品牌色(主组件 + 弹窗共享) // Logan.Li
export const providerColors: Record<string, string> = {
aliyun: 'bg-orange-500',
tencent: 'bg-blue-500',
aws: 'bg-amber-500',
huawei: 'bg-red-500',
azure: 'bg-sky-500',
};
export function formatCurrency(n: number) {
return `¥${n.toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
}