I need to format a value to currency using the bootstrap-vue formatter (b-table - fields).
My current attempt:
fields: [
{ key: 'value', label: 'value(R$)', sortable: true,
formatter: (value, key, item) => {
return Number(item.value).toLocaleString('pt-BR', {
style: 'decimal', currency: 'BRL'
})
}
},
]
I need to somehow format these values that I get from my backend (axios).
Can help-me?