• 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: '已取消删除'
              });
            });
          },
  • 相关阅读:
    fastapi教程进阶
    fastapi快速入门
    Linux yum安装PostgreSQL9.6
    harbor helm仓库使用
    Dockfile文件解析
    K8S概念理解
    转载---Beats:如何使用Filebeat将MySQL日志发送到Elasticsearch
    Elasticsearch中text与keyword的区别
    filebeat知识点
    logstash知识点
  • 原文地址:https://www.cnblogs.com/xiaofang234/p/15156182.html
Copyright © 2020-2023  润新知