vue实现按钮倒计时失效(Vue button countdown failure)

let sj = setInterval(() => {
        this.time--  //初始时间为10秒
        this.msg = this.time + '后再操作'    //按钮提示文字
        this.flag = true   //设置按钮失效
        if (this.time == 0) {
          clearInterval(sj)
          this.time = 10
          this.msg = '发送验证码'
          this.flag = false
        }
      },1000)
————————
let sj = setInterval(() => {
        this.time--  //初始时间为10秒
        this.msg = this.time + '后再操作'    //按钮提示文字
        this.flag = true   //设置按钮失效
        if (this.time == 0) {
          clearInterval(sj)
          this.time = 10
          this.msg = '发送验证码'
          this.flag = false
        }
      },1000)