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