zoukankan      html  css  js  c++  java
  • element后台项目列表删除最后一项显示无数据

    解决方法:

     delBlackPerson(row){
              let params= {
                  id:row.id
              }
              this.$confirm('确定删除该用户吗?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
            }).then(() => {
                deletePerson(params).then(res => {
                if (res.code == 200) {
                    this.$message({
                        type: 'success',
                        message: '删除成功!'
                    });
                    let totalPage = Math.ceil((this.total-1) / this.pageSize)   //加上这三行就可以解决了
                    let currentPage = this.currentPage > totalPage ? totalPage : this.currentPage 
                    this.currentPage = currentPage < 1 ? 1 : currentPage
                    this.getTableList(); //重新查询一次
                } else{
                    this.$message({
                        type: 'error',
                        message: res.message
                    });
                }
            });
            }).catch(() => {
              this.$message({
                type: 'info',
                message: '已取消删除'
              });
            });
          },
  • 相关阅读:
    还贷的那些事V——等增幅还贷的计算
    计算机中的颜色X——两颜色的偏转值
    高亮显示不区分大小写的关键字——ASP
    一道算法题,看看大家的思路
    一道算法题,看看大家的思路(续)
    IQCar的实现II——解题思路
    IQCar的实现I——IQCar的介绍
    Flex画流程图
    jQuery源码研究01
    javascript笔记:javascript里面不同function定义的区别
  • 原文地址:https://www.cnblogs.com/xiaofang234/p/15156182.html
Copyright © 2011-2022 走看看