Skip to content

Commit 8e33228

Browse files
committed
style: 更新成本格式化逻辑
1 parent 6a91e68 commit 8e33228

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/records/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ function formatTimestamp(ts: string) {
6666
}
6767

6868
function formatCost(value: number) {
69+
// 0 值显示为 $0,非0值保留5位小数
70+
if (value === 0) return "$0";
6971
return `$${value.toFixed(5)}`;
7072
}
7173

0 commit comments

Comments
 (0)