Convert frontend to Vue #3

Merged
jacob1123 merged 158 commits from vue into master 2022-02-08 22:20:11 +01:00
Showing only changes of commit 427e7e5359 - Show all commits

View File

@ -2,11 +2,18 @@
import { defineComponent } from "vue"; import { defineComponent } from "vue";
export default defineComponent({ export default defineComponent({
props: ["value"] props: ["value"],
computed: {
formattedValue() {
return this.value.toLocaleString(undefined, {
minimumFractionDigits: 2,
});
}
}
}) })
</script> </script>
<template> <template>
<span :class="value < 0 ? 'negative' : ''">{{value.toLocaleString(undefined, {minimumFractionDigits: 2,})}} </span> <span class="text-right" :class="value < 0 ? 'negative' : ''">{{formattedValue}} </span>
</template> </template>