版本:
"mpvue-loader": "1.0.13",
"mpvue-template-compiler": "^1.0.11",
"mpvue-webpack-target": "^1.0.0",
示例代码:
<template>
<div class="container">
<div :animation="animation1">单个动画animation</div>
<div v-for="(v,ind) in list" :animation="v.animationData" :key="ind">{{v.word}}</div>
</div>
</template>
<script>
export default {
data() {
return {
list: [],
animation1: ""
}
},
onShow() {
var animation1 = wx.createAnimation({
duration: 3000,
timingFunction: 'ease',
})
animation1.translate(30).step()
this.animation1 = animation1.export();
var animation2 = wx.createAnimation({
duration: 3000,
timingFunction: 'ease',
});
animation2.translate(30).step()
this.list = [{
animationData: animation2.export(),
word: "v-for中设置的动画",
}];
}
}
</script>
gif演示效果
v-for中设置的animation并没有动画效果
2条答案
按热度按时间lyr7nygr1#
我也出现了这个问题~请问应该如何解决?
5n0oy7gb2#
官网也没有demo,这框架是不是要凉凉了?