如何用front做网站网页,网站开发的硬件设备,wordpress新版编辑器使用教程,网页设计短板图片❤ vue清除定时器Bug
页面加载#xff0c;清除定时器 clearTimeout(intm)
问题
遇见的需求是#xff1a;webapp 从A页面进入B页面,B页面点击按钮#xff0c;加载完B页面的加载效果进入c#xff0c;从C页面返回A页面#xff0c;仍然显示B页面的加载效果
结果定时器一直…❤ vue清除定时器Bug
页面加载清除定时器 clearTimeout(intm)
问题
遇见的需求是webapp 从A页面进入B页面,B页面点击按钮加载完B页面的加载效果进入c从C页面返回A页面仍然显示B页面的加载效果
结果定时器一直无法清除在destory销毁之中。后来反复查找修改无果。多次翻看以后突然之间发现一个问题就是加载的页面的窗口我并没有进行隐藏直接【_this.showTapfalse】解决掉了问题。
timer1 setInterval(function() {if (_this.numsheCount 100) { _this.numsheCount;
if (_this.numsheCount 0 _this.numsheCount 15) {_this.text 努力...;
} else if (_this.numsheCount 20) {_this.text 正在...;} else if (_this.numsheCount 25) {_this.text 准备分析...;} else if (_this.numsheCount 50) {_this.text 分析中...;} else if (_this.numsheCount 99) {_this.text 久等了亲已分析完毕!...;}} else {clearInterval(timer1)setTimeout(function() {_this.localStorage.setItem(xyuid, _this.value);_this.$router.push(saogao)_this.zhuan false;}, 50)}}, 30)