问题:element (el-pagination)删除最后一页的所有数据后,currentPage没更新

处理方法:

// 删除需求
        delNeed(demand_id){
          API_MyInform.delDemand(demand_id).then(res => {
            this.$layerMessage.success('删除成功!');
            // 更新当前页码
            let totalPage = Math.ceil((this.totalNum - 1)/this.pageSize);
            let currentPage = this.currentPage > totalPage ? totalPage : this.currentPage;
            this.currentPage = this.currentPage < 1 ? 1 : currentPage;
            this.getMyDemandList();
          })
        },
原文地址:https://www.cnblogs.com/duanzhenzhen/p/12565911.html