Use setTitle everywhere
This commit is contained in:
@ -15,7 +15,7 @@ interface Data {
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
modelValue: Suggestion,
|
||||
modelValue: Suggestion | undefined,
|
||||
type: String
|
||||
}>();
|
||||
|
||||
|
@ -1,13 +1,15 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
|
||||
const props = defineProps<{ value: number }>();
|
||||
const props = defineProps<{ value: number | undefined }>();
|
||||
|
||||
const formattedValue = computed(() => Number(props.value).toLocaleString(undefined, {
|
||||
const internalValue = computed(() => Number(props.value ?? 0));
|
||||
|
||||
const formattedValue = computed(() => internalValue.value.toLocaleString(undefined, {
|
||||
minimumFractionDigits: 2,
|
||||
}));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<span class="text-right" :class="value < 0 ? 'negative' : ''">{{ formattedValue }} €</span>
|
||||
<span class="text-right" :class="internalValue < 0 ? 'negative' : ''">{{ formattedValue }} €</span>
|
||||
</template>
|
Reference in New Issue
Block a user