mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
37 lines
800 B
Vue
37 lines
800 B
Vue
<template>
|
|
<transition :name="transition.name" :mode="transition.mode">
|
|
<router-view></router-view>
|
|
</transition>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'nuxt-child',
|
|
props: {
|
|
transition: {
|
|
type: Object,
|
|
default: () => {
|
|
return {
|
|
hooks: false,
|
|
mode: 'out-in', // out-in ou in-out
|
|
name: 'fade',
|
|
type: '', // animation ou transition
|
|
enterClass: '',
|
|
enterActiveClass: '',
|
|
leaveClass: '',
|
|
leaveActiveClass: '',
|
|
beforeEnter: null, // Func
|
|
enter: null,
|
|
afterEnter: null,
|
|
enterCancelled: null,
|
|
beforeLeave: null,
|
|
leave: null,
|
|
afterLeave: null,
|
|
leaveCancelled: null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|