Преглед изворни кода

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
     clearInterval(this.timer);
205
     clearInterval(this.timer);
206
     this.timer = null;
206
     this.timer = null;
207
   }
207
   }