mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 02:44:51 +00:00
13 lines
279 B
Vue
13 lines
279 B
Vue
<script nuxt setup lang="ts">
|
|
import { asyncData } from '@nuxt/app'
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
const { data } = asyncData('time', () => $fetch('/api/count'))
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
Page visits: {{ data.count }}
|
|
</div>
|
|
</template>
|