webapp: apply number format based on locale in live view
This commit is contained in:
parent
c0ed5f3e14
commit
1893f4de3d
@ -33,7 +33,9 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatNumber(num: string) {
|
formatNumber(num: string) {
|
||||||
return parseFloat(num).toFixed(2);
|
return new Intl.NumberFormat(
|
||||||
|
undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }
|
||||||
|
).format(parseFloat(num));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user