feat: show function start time

This commit is contained in:
Anthony Fu committed 2021-11-05 12:41:46 +08:00
1 parent c338533e34
commit 6c3ed25a43
2 files changed
+9 -3

No files matched your search

+4 -2
View File
@@ -1,9 +1,11 @@
<script setup lang="ts">
const { data } = await useFetch('/api/pageview')
const time = useTimeAgo(computed(() => data.value.startAt))
</script>
<template>
<div op50>
Pageview: {{ data.pageview }}
<div text-gray>
<span font-500>{{ data.pageview }}</span> page views since <span font-500>{{ time }}</span>
</div>
</template>