mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 18:13:54 +00:00
30 lines
530 B
Vue
30 lines
530 B
Vue
<script lang="ts">
|
|
export default defineNuxtComponent({
|
|
name: 'DefineNuxtComponentTest',
|
|
setup () {
|
|
const router = useRouter()
|
|
|
|
return {
|
|
router,
|
|
}
|
|
},
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div>
|
|
<div
|
|
data-testid="define-nuxt-component-bar"
|
|
@click="router.push('/define-nuxt-component/nested/bar')"
|
|
>
|
|
Open bar
|
|
</div>
|
|
<div
|
|
data-testid="define-nuxt-component-foo"
|
|
@click="router.push('/define-nuxt-component/nested/foo')"
|
|
>
|
|
Open foo
|
|
</div>
|
|
</div>
|
|
</template>
|