Files
jinshen_calculator/src/components/ResultCard.vue

39 lines
754 B
Vue

<template>
<v-card
class="mb-4"
elevation="3"
rounded="lg"
>
<v-card-title class="bg-primary from-primary to-secondary text-white">
<v-icon
class="mr-2"
icon="mdi-calculator-variant"
/>
{{ label }}
</v-card-title>
<v-card-text class="text-h5 py-6 text-center">
<v-chip
class="text-h6 pa-4"
color="primary"
label
size="large"
variant="outlined"
>
{{ value.value.toFixed(2) }} {{ $t(`units.${value.unit}`) }}
</v-chip>
</v-card-text>
</v-card>
</template>
<script setup lang="ts">
import type { Param } from '@/types/param'
interface Props {
label: string
value: Param
}
defineProps<Props>()
</script>