【发布时间】:2020-06-05 18:41:05
【问题描述】:
我为 vuejs 找到了这个解决方案,但是 vue nativescript 不支持 v-on hook
https://stackoverflow.com/a/47634607/12937963
当动画必须播放时,我目前正在分配一个类:
模板
<Image
ref="Image"
:class="{scaleOut: scaleOutIsActive}"
v-on:animationend="animend" //doesn't work
v-on:transitionend="animend" //doesn't work
src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Red_circle.svg/1200px-Red_circle.svg.png"
stretch="none"
/>
CSS
.scaleOut {
animation-name: kfOut;
animation-duration: 1;
animation-fill-mode: forwards;
}
@keyframes kfOut {
from { transform: scale(1, 1); }
to { transform: scale(1.1,1.1);}
}
这应该触发一个函数
animend() {
//do something
}
【问题讨论】:
标签: javascript typescript vue.js nativescript nativescript-vue