move frontend to upper dir.
This commit is contained in:
26
src/components/CurrencyText.vue
Normal file
26
src/components/CurrencyText.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<span>{{ formattedValue }}</span>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
value: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
locale: {
|
||||
type: String,
|
||||
default: 'es-CO',
|
||||
},
|
||||
currency: {
|
||||
type: String,
|
||||
default: 'COP',
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
formattedValue() {
|
||||
return new Intl.NumberFormat(this.locale, { style: 'currency', currency: this.currency }).format(this.value);
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user