let time = 10
    let intervalFunc = window.setInterval(() => {
      time = time - 1
      if (time < 1) {
        window.clearInterval(intervalFunc)
      }
    }, 1000)

  

转载于:https://www.cnblogs.com/fm060/p/10751687.html

Logo

前往低代码交流专区

更多推荐