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: '已取消删除'
              });
            });
          },
  • 相关阅读:
    细说mysql索引
    SQL常见优化Sql查询性能的方法有哪些?
    JDK提供的几种线程池比较
    JVM 内部运行线程介绍
    线上服务CPU100%问题快速定位实战
    浅谈Java中的hashcode方法
    Spring 核心组件工作原理简析
    SpringMVC工作原理
    open MMT.distributions = null on transaction type: WIP Lot Split
    OSFM Tables
  • 原文地址:https://www.cnblogs.com/xiaofang234/p/15156182.html
Copyright © 2011-2022 走看看