2021-03-18 14:26:41 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2021-04-03 10:03:20 +00:00
|
|
|
<h2>
|
|
|
|
Hello world
|
|
|
|
</h2>
|
|
|
|
<strong>Playground pages</strong>
|
|
|
|
<ul>
|
|
|
|
<li v-for="link of links" :key="link">
|
|
|
|
<nuxt-link :to="link">
|
|
|
|
{{ link }}
|
|
|
|
</nuxt-link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
2021-03-18 14:26:41 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
2021-04-03 10:03:20 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
import { defineComponent } from 'vue'
|
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
setup () {
|
|
|
|
const links = useRouter().getRoutes().filter(route => ['index', '404'].includes(route.name) === false).map(route => route.path)
|
|
|
|
|
|
|
|
return { links }
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|