急!cover-view绑定animation为什么不生效?
<cover-view
v-if="exitModel"
:class="[exitModel && 'exit_model_show']"
>
<cover-view class="exit_model_cont f-c-c-c">确认要退出测量吗?</cover-view>
<cover-view class="exit_model_bottom f">
<cover-view class="item f-c-c" @click="exitModel = false"> 取消</cover-view>
<cover-view class="item f-c-c" @click="exitConfirm">退出</cover-view>
</cover-view>
</cover-view>
export default {
mixins: [behavior, yuvBehavior],
data() {
return {
animation: null,
animationData: {}
}
},
mounted() {
this.animation = uni.createAnimation({
duration: 1000,
timingFunction: 'ease-in-out'
})
},
methods:{
exit() {
this.animation.opacity(1).step()
this.animationData = this.animation.export()
this.exitModel = true
},
cancle() {
this.animation.opacity(0).step()
this.animationData = this.animation.export()
this.exitModel = false
},
}
}