number format account profile details
This commit is contained in:
parent
10c34f7cca
commit
3c0fe1effc
|
@ -4,7 +4,7 @@
|
||||||
Toots
|
Toots
|
||||||
</span>
|
</span>
|
||||||
<span class="account-profile-details-item-datum">
|
<span class="account-profile-details-item-datum">
|
||||||
{{account.statuses_count || 0}}
|
{{numStatusesDisplay}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="account-profile-details-item">
|
<div class="account-profile-details-item">
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
Follows
|
Follows
|
||||||
</span>
|
</span>
|
||||||
<span class="account-profile-details-item-datum">
|
<span class="account-profile-details-item-datum">
|
||||||
{{account.following_count || 0}}
|
{{numFollowingDisplay}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="account-profile-details-item">
|
<div class="account-profile-details-item">
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
Followers
|
Followers
|
||||||
</span>
|
</span>
|
||||||
<span class="account-profile-details-item-datum">
|
<span class="account-profile-details-item-datum">
|
||||||
{{account.followers_count || 0}}
|
{{numFollowersDisplay}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -85,4 +85,18 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<script>
|
||||||
|
const numberFormat = new Intl.NumberFormat('en-US')
|
||||||
|
|
||||||
|
export default {
|
||||||
|
computed: {
|
||||||
|
numStatuses: account => account.statuses_count || 0,
|
||||||
|
numFollowing: account => account.following_count || 0,
|
||||||
|
numFollowers: account => account.followers_count || 0,
|
||||||
|
numStatusesDisplay: numStatuses => numberFormat.format(numStatuses),
|
||||||
|
numFollowingDisplay: numFollowing => numberFormat.format(numFollowing),
|
||||||
|
numFollowersDisplay: numFollowers => numberFormat.format(numFollowers)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue