Selector/Selector.Web/scripts/Past/CountCard.ts

23 lines
450 B
TypeScript
Raw Normal View History

2022-10-10 22:29:47 +01:00
import * as Vue from "vue";
export let CountCard: Vue.Component = {
props: ['count'],
computed: {
2022-11-19 11:47:23 +00:00
formattedCount() {
if(this.count != null)
{
return this.count.toLocaleString()
}
else
{
return '0';
}
}
2022-10-10 22:29:47 +01:00
},
template:
`
<div class="card">
2022-11-19 11:47:23 +00:00
<h2>{{ formattedCount }}</h2>
2022-10-10 22:29:47 +01:00
</div>
`
}