Vue for loops out the transition animation mode that div gives to each div, and then determines to give different animation mode.

problem description

vue fordiv div 
 

the environmental background of the problems and what methods you have tried

DIV
 type="1" ,

related codes

/ / Please paste the code text below (do not replace the code with pictures)

this is the code for the loop

 <div v-for="pageData in pageData" >
                <transition 
                    v-on:before-enter="beforeEnter"
                    v-on:enter="enter"
                    v-on:leave="leave"
                    v-bind:css="false"
                >   
                    <page :key="pageData._Id" v-if="flag" :pageData="pageData" :subPageData="subPageData" :resObject="resObject"></page>
                </transition>   
            </div>

Sub-component code

 <div class="page" v-bind:style="{
                            width:"100%",
                            height:"0px",
                            paddingBottom:data._PercentHeight,
                            backgroundColor:data._BackgroundColor,
                            backgroundImage:"url(/static/images/"+data._BackgroundImg+")",
                        } "
                        v-if="data._Id == showPageId" key="data._Id">
                            <div>xxxxxxxxxxx</div>
                        </div>

this is the code for the animation

methods:{
    // 
         beforeEnter: function (el) {
              //
               el.style.opacity = 0
        },
        enter: function (el, done) {
            //"..."
          Velocity(el, { opacity: 1})
          Velocity(el, { complete: done })
        },
        leave: function (el, done) {
            //
          Velocity(el, {
            opacity: 0
          }, { complete: done })
        },
    }

what result do you expect? What is the error message actually seen?

how can I give different animation methods to the ergodic div by judging the value of pageData.type

Feb.17,2022

use animate.js, and then distinguish the data, and change different entry methods by adding different class names

<transition enter-active-class="slideInLeft" leave-active-class="slideOutUp">
    <div v-if = "isShow" class="box animated"></div>
</transition>

introduce the js and css, of animate, and then add a filter to the data by adding the class name to the data. if you want to animate the time, you can change it in css.

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-1b3c685-2c308.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-1b3c685-2c308.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?