用setTimeout代替setInterval
2019-02-15 本文已影响0人
Mr君
递归调用
let time = null;
const handleTimeout = () => {
time = setTimeout(() => {
clearTimeout(time);
handleTimeout();
})
}
递归调用
let time = null;
const handleTimeout = () => {
time = setTimeout(() => {
clearTimeout(time);
handleTimeout();
})
}