-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed as not planned
Labels
Description
Hello 👋,
I am trying to port my "vue syntax transition" to a more "nuxt friendly" solution. For now I have :
<script setup lang="ts">
const onBeforeLeave = (el) => {}
const onLeaver = (el, done) => {}
const onEnter = (el, done) => {}
const onAfterEnter = (el) => {}
</script>
<template>
<router-view v-slot="{ Component }">
<Transition
mode="out-in"
:css="false"
@before-leave="onBeforeLeave"
@leave="onLeave"
@enter="onEnter"
@after-enter="onAfterEnter"
>
<component :is="Component" />
</Transition>
</router-view>
</template>
that is working quite well. however, the following config coming from the doc doesn't seems to work in app.vue
:
<script setup lang="ts">
definePageMeta({
pageTransition: {
name: 'custom-flip',
mode: 'out-in',
onBeforeEnter: (el) => {
console.log('Before enter...')
},
onEnter: (el, done) => {},
onAfterEnter: (el) => {}
}
})
</script>
n0099