html
<el-pagination :current-page="paginationQuery.pageNum" :page-sizes="[15, 20, 30]" :page-size="paginationQuery.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="cloneTableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
js
// 前端分页 handleSizeChange(val) { this.paginationQuery.pageSize = val this.setPagination() }, // 前端分页 handleCurrentChange(val) { this.paginationQuery.pageNum = val this.setPagination() }, // 前端分页 setPagination() { const start = this.paginationQuery.pageSize * (this.paginationQuery.pageNum - 1) const end = this.paginationQuery.pageSize * this.paginationQuery.pageNum this.tableData = this.cloneTableData.slice(start, end) },