提交 b3fd3806 编写于 作者: 张磊

添加transitionend相关文档说明

上级 82f48c9c
......@@ -21,9 +21,46 @@
- @tap
- @click //与tap等价
- @longpress
- @transitionend
在多点触摸的屏幕上,touch事件返回数组,包含了每个touch点对应的x、y坐标。
### transition 事件
- @transitionend
transition 效果结束时触发
```vue
<template>
<image class="transition-transform" id="transition-transform" @transitionend="onEnd" src="/static/uni.png"></image>
</template>
<script>
export default {
data() {
return {}
},
onReady() {
var element = uni.getElementById('transition-transform')
element!.style.setProperty('transform', 'rotate(360deg)')
},
methods: {
onEnd() {
console.log("transition效果结束")
}
}
}
</script>
<style>
.transition-transform {
transition-duration: 2000;
transition-property: transform;
transform: rotate(0deg);
}
</style>
```
### 冒泡事件系统
DOM事件主要有三个阶段:捕获阶段、目标阶段和冒泡阶段。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册