|
|
@ -41,12 +41,13 @@ const currencyMeta = computed(() => { |
|
|
|
|
|
|
|
|
|
|
|
const currency = computed(() => { |
|
|
|
const currency = computed(() => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
return !vModel.value || isNaN(vModel.value) |
|
|
|
if (vModel.value === null || vModel.value === undefined || isNaN(vModel.value)) { |
|
|
|
? vModel.value |
|
|
|
return vModel.value |
|
|
|
: new Intl.NumberFormat(currencyMeta.value.currency_locale || 'en-US', { |
|
|
|
} |
|
|
|
style: 'currency', |
|
|
|
return new Intl.NumberFormat(currencyMeta.value.currency_locale || 'en-US', { |
|
|
|
currency: currencyMeta.value.currency_code || 'USD', |
|
|
|
style: 'currency', |
|
|
|
}).format(vModel.value) |
|
|
|
currency: currencyMeta.value.currency_code || 'USD', |
|
|
|
|
|
|
|
}).format(vModel.value) |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
return vModel.value |
|
|
|
return vModel.value |
|
|
|
} |
|
|
|
} |
|
|
|