2016-12-13 16:42:41 +00:00
|
|
|
<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 {
|
2016-12-13 18:00:21 +00:00
|
|
|
hooks: false,
|
2016-12-13 16:42:41 +00:00
|
|
|
mode: 'out-in', // out-in ou in-out
|
|
|
|
name: 'fade',
|
|
|
|
type: '', // animation ou transition
|
2016-12-13 18:00:21 +00:00
|
|
|
enterClass: '',
|
|
|
|
enterActiveClass: '',
|
|
|
|
leaveClass: '',
|
|
|
|
leaveActiveClass: '',
|
2016-12-13 16:42:41 +00:00
|
|
|
beforeEnter: null, // Func
|
2016-12-13 18:00:21 +00:00
|
|
|
enter: null,
|
2016-12-13 16:42:41 +00:00
|
|
|
afterEnter: null,
|
|
|
|
enterCancelled: null,
|
2016-12-13 18:00:21 +00:00
|
|
|
beforeLeave: null,
|
|
|
|
leave: null,
|
2016-12-13 16:42:41 +00:00
|
|
|
afterLeave: null,
|
2016-12-13 18:00:21 +00:00
|
|
|
leaveCancelled: null
|
2016-12-13 16:42:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|