My code includes a parent and child component, with the child component containing a <transition>
element with specific options:
<template lang="pug">
div
transition(name="fade-transition" mode="out-in" v-on:after-enter="fnAfterEnter")
h1(v-if"someCondition") lorem ipsum
</template>
<script>
export default {
methods: {
fnAfterEnter () {
do something here...
}
}
}
</script>
The issue arises in the parent component where some functions are used to mount and destroy the child component based on a simple v-if
condition. Although everything works correctly upon the initial mounting of the child component, subsequent cycles of destroying and remounting result in none of the hooks within the <transition>
element triggering the fnAfterEnter
method.
I appreciate any assistance you can provide :)