mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-05 20:07:16 +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>
|