zoukankan      html  css  js  c++  java
  • vue element 分页

       <el-pagination
            :current-page="currentPage"
            :page-sizes="[10, 30, 50]"
            :page-size="pageSize"
            layout="total, sizes, prev, pager, next, jumper"
            :total="totalCount"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
          />
     
      handleSizeChange(val) {
          // console.log("每页" + val + "条");
          // this.pageSize 是请求表格数据接口中的参数 设置表格每页显示多少条数据
          this.pageSize = val
          this.loadTableData() // 调表格数据的接口
        },
        handleCurrentChange(val) {
          this.currentPage = val
          this.loadTableData()
        },
     
    loadTableData() {
          orderList({
            pageNo: this.currentPage,
            pageSize: this.pageSize,
            orderBy: 'update_time',
            descending: true, // true 倒叙
            map: {
              search: this.searchinfo.trim()
            }
          }).then((res) => {
            // console.log(res)
            if (res.status === 200) {
              this.tableData = res.data
              this.totalCount = res.fsp.recordCount
            } else {
              this.$message.error(res.msg)
            }
          })
        },
    不求大富大贵,但求一生平凡
  • 相关阅读:
    关于软件设计中遇到的问题
    关于power shell
    如果TChart的发生异常
    重温gof版《设计模式》中的创建型模式
    如何更好的使用cvs
    存储过程返回临时表的问题
    关于bugzilla与svn结合的配置注意事项
    VC知识点:如何用vc6调试CGI程序
    如何让应用程序托盘化
    符号表
  • 原文地址:https://www.cnblogs.com/ylblogs/p/15481528.html
Copyright © 2011-2022 走看看