mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-17 06:08:42 +00:00
23 lines
357 B
Vue
23 lines
357 B
Vue
|
<template>
|
||
|
{{ value }}
|
||
|
</template>
|
||
|
|
||
|
<script setup lang="ts">
|
||
|
const props = defineProps({
|
||
|
amount: {
|
||
|
type: String,
|
||
|
required: true,
|
||
|
},
|
||
|
});
|
||
|
|
||
|
const fmt = await useFormatCurrency();
|
||
|
|
||
|
const value = computed(() => {
|
||
|
if (!props.amount || props.amount === "0") {
|
||
|
return "";
|
||
|
}
|
||
|
|
||
|
return fmt(props.amount);
|
||
|
});
|
||
|
</script>
|