-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
39 lines (36 loc) · 1.11 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<script setup lang="ts">
const route = useRoute()
</script>
<template>
<NuxtExampleLayout repo="nuxt/examples" example="routing/pages">
<NuxtLoadingIndicator />
<NuxtPage />
<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>
<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>
</nav>
</template>
<template #footer>
<div class="text-center p-4 op-50">
Current route: <code>{{ route.path }}</code>
</div>
</template>
</NuxtExampleLayout>
</template>