Fix odometer number format (#9345)
This commit is contained in:
parent
45836c5cc6
commit
f096716be8
3 changed files with 5 additions and 3 deletions
|
|
@ -207,7 +207,7 @@ export default {
|
|||
modal.show();
|
||||
},
|
||||
formatKm: function (value) {
|
||||
return `${distanceValue(value)} ${distanceUnit()}`;
|
||||
return `${this.fmtNumber(distanceValue(value), 0)} ${distanceUnit()}`;
|
||||
},
|
||||
async changeVehicle(index) {
|
||||
await this.updateSession({
|
||||
|
|
|
|||
|
|
@ -28,10 +28,12 @@
|
|||
import LabelAndValue from "./LabelAndValue.vue";
|
||||
import AnimatedNumber from "./AnimatedNumber.vue";
|
||||
import { distanceUnit } from "../units";
|
||||
import formatter from "../mixins/formatter";
|
||||
|
||||
export default {
|
||||
name: "TargetSocSelect",
|
||||
components: { LabelAndValue, AnimatedNumber },
|
||||
mixins: [formatter],
|
||||
props: {
|
||||
targetSoc: Number,
|
||||
rangePerSoc: Number,
|
||||
|
|
@ -69,7 +71,7 @@ export default {
|
|||
return `${Math.round(value)}%`;
|
||||
},
|
||||
formatKm: function (value) {
|
||||
return `${Math.round(value)} ${distanceUnit()}`;
|
||||
return `${this.fmtNumber(value, 0)} ${distanceUnit()}`;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
class="flex-grow-1"
|
||||
:label="$t('main.vehicle.vehicleSoc')"
|
||||
:value="vehicleSoc ? `${Math.round(vehicleSoc)}%` : '--'"
|
||||
:extraValue="range ? `${Math.round(range)} ${rangeUnit}` : null"
|
||||
:extraValue="range ? `${fmtNumber(range, 0)} ${rangeUnit}` : null"
|
||||
align="start"
|
||||
/>
|
||||
<LabelAndValue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue