Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
508
Widok
0
28/05/2023 6:15 pm
Topic starter
example
1 Answer
0
28/05/2023 6:16 pm
Topic starter
1. edit app.js
2. after vue initialization ( app variable) add this global filter
app.config.globalProperties.$filters = { formatNumber(number) { return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, "."); } }
3. then in any component use this filter
<span class="text-success">{{ $filters.formatNumber(this.bigNumber) }} </span>
This post was modified 1 rok temu by mrmucha