页面定时刷新接口分为这几步:

data() {
    return {
      times: null, 
    };
  },
created() {
    this.getErrorLogDataFun();
    this.times = setInterval(() => {
      this.getErrorLogDataFun();
    }, 1000 * 60);
  },
methods: {
  getErrorLogDataFun() {
    //请求XXXXXX
  }
}
destroyed() {//销毁
  clearInterval(this.times);
},

Logo

前往低代码交流专区

更多推荐