提交 3a131c6f 编写于 作者: H hdx

feat(animation-frame): 移除 uni 前缀,使用全局 API

上级 9289965f
......@@ -23,13 +23,13 @@
},
methods: {
startRequestAnimationFrame() {
this.taskId = uni.requestAnimationFrame((_ : number) => {
this.taskId = requestAnimationFrame((_ : number) => {
this.testFrameCount++
this.startRequestAnimationFrame()
})
},
stopRequestAnimationFrame() {
uni.cancelAnimationFrame(this.taskId)
cancelAnimationFrame(this.taskId)
}
}
}
......
......@@ -16,7 +16,7 @@
},
methods: {
startRequestAnimationFrame() {
uni.requestAnimationFrame((_ : number) => {
requestAnimationFrame((_ : number) => {
this.testFrameCount++;
})
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册