소스 검색

feat: 修复页面切换时定时器重复

@dayan_hjm 2 년 전
부모
커밋
5b4cf8b49d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/pages/tqcDataVHome/view.jsx

+ 1 - 1
src/pages/tqcDataVHome/view.jsx

@@ -201,7 +201,7 @@ class Home extends Component {
201 201
     });
202 202
   }
203 203
 
204
-  componentDidCatch() {
204
+  componentWillUnmount() {
205 205
     clearInterval(this.timer);
206 206
     this.timer = null;
207 207
   }