fix: comma input & i18n

This commit is contained in:
puriphatt 2024-10-09 09:43:18 +07:00
parent fb98ba3d32
commit 263a4fcedc
4 changed files with 13 additions and 8 deletions

View file

@ -95,7 +95,7 @@ withDefaults(
@update:model-value="
(v) => {
if (typeof v === 'string') price4Show = commaInput(v);
const x = parseInt(
const x = parseFloat(
price4Show && typeof price4Show === 'string'
? price4Show.replace(/,/g, '')
: '',
@ -120,7 +120,7 @@ withDefaults(
@update:model-value="
(v) => {
if (typeof v === 'string') agentPrice4Show = commaInput(v);
const x = parseInt(
const x = parseFloat(
agentPrice4Show && typeof agentPrice4Show === 'string'
? agentPrice4Show.replace(/,/g, '')
: '',
@ -145,7 +145,7 @@ withDefaults(
@update:model-value="
(v) => {
if (typeof v === 'string') serviceCharge4Show = commaInput(v);
const x = parseInt(
const x = parseFloat(
serviceCharge4Show && typeof serviceCharge4Show === 'string'
? serviceCharge4Show.replace(/,/g, '')
: '',