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: '已取消删除'
              });
            });
          },
  • 相关阅读:
    CentOS 7 源码编译安装 Mysql 5.7
    Nginx 负载均衡 后端 监控检测 nginx_upstream_check_module 模块的使用
    cronolog 对 tomcat 7 进行日志切割
    OpenStack
    Oracle GoldenGate 异构平台同步(Mysql到Oracle)
    ELK 日志分析体系
    Tengine TCP 负载均衡
    MariaDB GTID 复制同步
    Mycat 安装配置
    Navicat破解
  • 原文地址:https://www.cnblogs.com/xiaofang234/p/15156182.html
Copyright © 2011-2022 走看看