1、定义一个self暂存this

2、再改变变量的值,则生效啦

   var self=this;
        this.toastrVal = inVal;
        this.loadState = true;
        this.noBg = bgState;
        setTimeout(function () {
          self.loadState = false;
        }, 3000)

Logo

前往低代码交流专区

更多推荐