2021-12-23 19:27:08 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
const route = useRoute()
|
|
|
|
</script>
|
2021-04-23 20:30:43 +00:00
|
|
|
|
2021-12-23 19:27:08 +00:00
|
|
|
<template>
|
|
|
|
<NuxtExampleLayout example="with-pages">
|
2021-04-23 20:30:43 +00:00
|
|
|
<NuxtPage />
|
2021-12-23 19:27:08 +00:00
|
|
|
|
|
|
|
<template #nav>
|
|
|
|
<nav class="flex align-center gap-4 p-4">
|
|
|
|
<NuxtLink to="/" class="n-link-base">
|
|
|
|
Home
|
|
|
|
</NuxtLink>
|
|
|
|
<NuxtLink to="/about" class="n-link-base">
|
|
|
|
About
|
|
|
|
</NuxtLink>
|
|
|
|
<NuxtLink to="/parent" class="n-link-base">
|
|
|
|
Parent (index)
|
|
|
|
</NuxtLink>
|
|
|
|
<NuxtLink to="/parent/b" class="n-link-base">
|
|
|
|
Parent (b)
|
|
|
|
</NuxtLink>
|
2022-01-24 10:35:28 +00:00
|
|
|
<button class="n-link-base" @click="$router.push(`/parent/reload-${(Math.random() * 100).toFixed()}`)">
|
|
|
|
Keyed child
|
|
|
|
</button>
|
|
|
|
<button class="n-link-base" @click="$router.push(`/parent/static-${(Math.random() * 100).toFixed()}`)">
|
|
|
|
Non-keyed child
|
|
|
|
</button>
|
2021-12-23 19:27:08 +00:00
|
|
|
</nav>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template #footer>
|
|
|
|
<div class="text-center p-4 op-50">
|
|
|
|
Current route: <code>{{ route.path }}</code>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</NuxtExampleLayout>
|
2021-04-23 20:30:43 +00:00
|
|
|
</template>
|