File tree Expand file tree Collapse file tree 3 files changed +16
-10
lines changed
Expand file tree Collapse file tree 3 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 1414 },
1515 "dependencies" : {
1616 "@opentiny/unplugin-tiny-vue" : " ^0.0.2" ,
17- "@opentiny/vue" : " ^3.17.2" ,
1817 "@vueuse/core" : " ^8.9.4" ,
18+ "antd" : " 5.0.0" ,
19+ "element-plus" : " ^2.0.2-beta.44" ,
20+ "element-ui" : " ^2.15.1" ,
1921 "vue" : " ^3.4.35" ,
2022 "vue-router" : " ^4.4.1"
2123 },
Original file line number Diff line number Diff line change 11<script setup>
2- // asdas
2+ const str = ' asdsa '
33
4- fn ({ name: ' simon' })
4+ onMounted (() => {
5+ console .log (' mounted' )
6+ })
57 </script >
68
79<template >
8- <div @click = " onClick " @keydown = " keydownHandler " / >
10+ <div >hello world</ div >
911</template >
1012
1113<style scoped></style >
Original file line number Diff line number Diff line change @@ -34,20 +34,22 @@ export function useRaf(
3434 cancelAnimation ( rafId )
3535 }
3636 rafId = animationFrame ( function myFrame ( timestamp : number ) {
37- if ( isStopped )
38- return
3937 if ( isUndef ( start ) ) {
4038 start = timestamp
4139 // 首次立即执行
40+ if ( autoStop ) {
41+ stop ( )
42+ fn ?.( timestamp )
43+ return
44+ }
4245 fn ?.( timestamp )
4346 }
47+ else if ( isStopped ) {
48+ return
49+ }
4450 else if ( timestamp - start > delta ) {
4551 fn ?.( timestamp )
4652 start = timestamp
47- if ( autoStop ) {
48- stop ( )
49- return
50- }
5153 }
5254 rafId = animationFrame ( myFrame )
5355 } )
You can’t perform that action at this time.
0 commit comments