1.在getList()函数中加上判断,判断是否还有数据,若没有再次调用getList()函数。

    /** 查询数据列表 */
    getList() {
      this.loading = true;
      listData(this.addDateRange(this.queryParams, this.dateRange)).then(
        (response) => {
          this.dataList = response.rows;
          /* 判断是否还有数据 */
          if(response.rows.length>0){
               this.getList();
          }
          this.total = response.total;
          this.loading = false;
        }
      );
    },

Logo

快速构建 Web 应用程序

更多推荐