fix currency display

This commit is contained in:
Warunee Tamkoo 2023-09-14 10:53:01 +07:00
parent 8783a54691
commit 256129a358

View file

@ -13,8 +13,8 @@
:borderless="!edit" :borderless="!edit"
hide-bottom-space hide-bottom-space
> >
<template v-for="(_, slot) in slots" v-slot:[slot]="scope"> <template v-for="slot in slots">
<slot :name="slot" v-bind="scope || {}" /> <slot :name="slot" />
</template> </template>
</q-input> </q-input>
</template> </template>
@ -37,9 +37,9 @@ const props = defineProps({
}); });
const { inputRef, formattedValue, setValue } = useCurrencyInput({ const { inputRef, formattedValue, setValue } = useCurrencyInput({
locale: "en-US", locale: "th-TH",
currency: "EUR", currency: "THB",
// currencyDisplay: "hidden", currencyDisplay: "hidden" as any,
hideCurrencySymbolOnFocus: true, hideCurrencySymbolOnFocus: true,
hideGroupingSeparatorOnFocus: true, hideGroupingSeparatorOnFocus: true,
hideNegligibleDecimalDigitsOnFocus: true, hideNegligibleDecimalDigitsOnFocus: true,
@ -50,7 +50,7 @@ const { inputRef, formattedValue, setValue } = useCurrencyInput({
watch( watch(
() => props.modelValue, () => props.modelValue,
(value) => { (value: any) => {
setValue(value); setValue(value);
} }
); );