提交 819a1d7e 编写于 作者: 张磊

调整transition示例,修改transition-duration设置时机。

上级 51bbcd37
......@@ -29,16 +29,16 @@
}
this.buttonValue = "关闭图片旋转"
this.times = this.times + 1
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.element!.style.setProperty('transition-duration', '2000ms')
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.isStart = true
} else {
this.isStart = false
this.times = 0
this.onTransitionEndTriggr = false
this.buttonValue = "开启图片旋转"
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
this.element!.style.setProperty('transition-duration', '0ms')
this.element!.style.setProperty('transform', 'rotate(' + this.times * 360 + 'deg)')
}
},
onEnd() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册