We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cb60ea commit c0ae041Copy full SHA for c0ae041
docs/src/components/StarCount.vue
@@ -6,7 +6,7 @@
6
class="flex items-center text-xs font-bold font-body border-2 text-zinc-400 border-zinc-400 rounded-full px-3 py-1.5 hover:border-emerald-500 hover:text-emerald-500 select-none"
7
>
8
<Icon name="star" class="w-4 h-4 mr-1" />
9
- {{ count }}
+ {{ format(count) }}
10
</a>
11
</template>
12
@@ -19,6 +19,10 @@ const props = defineProps<{
19
initialCount?: number;
20
}>();
21
22
+function format(number: number) {
23
+ return number.toLocaleString();
24
+}
25
+
26
const count = ref(props.initialCount || 10000);
27
28
onMounted(async () => {
0 commit comments