stopAll() {
let end = setInterval(function() {}, 10000);
for (let i = 1; i <= end; i++) {
clearInterval(i);
}
let id = setTimeout(() => {}, 0);
while (id > 0) {
clearTimeout(id)
id--;
}
}
vue 停掉页面上所有的setInterval setTimeout定时器
最新推荐文章于 2023-11-27 11:19:34 发布