What is the trigger condition of appear-cancelled in Vue animation?

as the title: what is the trigger condition of appear-cancelled in Vue animation? What are the application scenarios? Thank you for the answer ~

Apr.21,2021

the following example is the perfect answer to your question

<template>
    <div>
        <transition
          appear
            v-on:before-appear="customBeforeAppearHook"
            v-on:appear="customAppearHook"
            v-on:after-appear="customAfterAppearHook"
            v-on:appear-cancelled="customAppearCancelledHook">
            <div ref="div" v-if="show">hello world</div>
        </transition>
    </div>
</template>

<script>
export default {
    data(){
        return {
            show: true
        }
    },
    methods: {
        customBeforeAppearHook(val){
            this.show = false

            console.log('customBeforeAppearHook')
        },
        customAppearHook(val){
            // this.show = false

            console.log('customAppearHook')
        },
        customAfterAppearHook(val){

            console.log('customAfterAppearHook')
        },
        customAppearCancelledHook(){
            console.log('customAppearCancelledHook')
        }
    },
    mounted(){
        console.log('mounted')
    }
}
</script>
< hr >

to sum up, the trigger condition is customBeforeAppearHook / customAppearHook two hook functions that do not display the operation v-if / v-show will trigger the appear-cancelled hook function. There are not many actual scenes, and some operations can be performed after the animation is cancelled by the user during the execution of the animation.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3f9c9-2c4b4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3f9c9-2c4b4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?