前端歌谣-第伍拾柒课-avue-crud的使用案例表格

本文详细介绍了如何在Avue前端框架中使用分页功能,包括`page.sync`处理、数据管理(如`tableData`)、加载状态控制以及响应式事件如`@current-change`和`@size-change`等。同时展示了如何在`avue-crud`组件中应用这些特性。
摘要由CSDN通过智能技术生成

前言

大家好 我是前端歌谣 今天继续给大家带来avue的讲解

:page.sync="page"分页处理

page: {
        total: 0, // 总页数
        currentPage: 1, // 当前页数
        pageSize: 10 // 每页显示多少条
      },

:data="tableData"表单数据

 tableData: [],

:table-loading="listLoading"是否加载状态

 listLoading: true,

@current-change=“currentChange” 分页变化

 currentChange(val) {
      this.page.page = val;
      this.page.currentPage = val;
      thi

@size-change="sizeChange"条数改变

 sizeChange(val) {
      this.page.limit = val;
      this.page.pageSize = val;
      this.getList();
    },

@selection-change="selectionChange"选择想发生改变时候变化

在这里插入图片描述

@search-change=“searchChange” 搜索的时候发生变化

在这里插入图片描述

@filter-change=“filterChange” 表格筛选条件发生变化时候

在这里插入图片描述

代码部分

   <avue-crud
      class="avue-affixed avue-new-table"
      ref="crud"
      :page.sync="page"
      :data="tableData"
      :option="tableOption"
      :table-loading="listLoading"
      @current-change="currentChange"
      @size-change="sizeChange"
      @selection-change="selectionChange"
      @search-change="searchChange"
      @filter-change="filterChange"
    >
    </avue-crud>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值