提交 52c60122 编写于 作者: H hdx

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

上级 f7c6def6
......@@ -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.
先完成此消息的编辑!
想要评论请 注册