webapp: apply number format based on locale in live view

This commit is contained in:
Thomas Basler 2022-07-12 21:07:46 +02:00
parent c0ed5f3e14
commit 1893f4de3d

View File

@ -33,7 +33,9 @@ export default defineComponent({
},
methods: {
formatNumber(num: string) {
return parseFloat(num).toFixed(2);
return new Intl.NumberFormat(
undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }
).format(parseFloat(num));
},
},
});