fix(scheduling): remove decimals from km display (1,990.2 → 1,990)
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -15,7 +15,7 @@ interface Props {
|
|||||||
|
|
||||||
function fmtKm(value: number): string {
|
function fmtKm(value: number): string {
|
||||||
if (value >= 10000) return (value / 10000).toFixed(1) + '万';
|
if (value >= 10000) return (value / 10000).toFixed(1) + '万';
|
||||||
return value.toLocaleString();
|
return Math.round(value).toLocaleString();
|
||||||
}
|
}
|
||||||
|
|
||||||
function fmtRate(rate: number): string {
|
function fmtRate(rate: number): string {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ interface Props {
|
|||||||
|
|
||||||
function fmtKm(value: number): string {
|
function fmtKm(value: number): string {
|
||||||
if (value >= 10000) return (value / 10000).toFixed(1) + '万';
|
if (value >= 10000) return (value / 10000).toFixed(1) + '万';
|
||||||
return value.toLocaleString();
|
return Math.round(value).toLocaleString();
|
||||||
}
|
}
|
||||||
|
|
||||||
function fmtRate(rate: number): string {
|
function fmtRate(rate: number): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user