소스 검색

fix: eslint 报错

qinlaiqiao 4 년 전
부모
커밋
573388bfcf
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/views/login/scripts/rotateCanvas.ts

+ 2 - 2
src/views/login/scripts/rotateCanvas.ts

@@ -125,12 +125,12 @@ export default function useRotateCanvas() {
         );
       };
 
-      function animate() {
+      const animate = () => {
         ctx.clearRect(0, 0, CANVAS_W, CANVAS_H);
         rotateBlue && rotateBlue.draw();
         rotateYellow && rotateYellow.draw();
         requestAnimationFrame(animate);
-      }
+      };
 
       animate();
     }