mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
efabacd8e2
Co-authored-by: Pooya Parsa <pyapar@gmail.com> Co-authored-by: Sébastien Chopin <seb@nuxtjs.com>
29 lines
569 B
Vue
29 lines
569 B
Vue
<template>
|
|
<div>
|
|
<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>
|
|
</div>
|
|
</template>
|
|
|
|
<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>
|