刚学vue3,记录一下
前端代码
size-change | pageSize 改变时触发 |
新每页条数 |
current-change | current-change 改变时触发 |
新当前页 |
<el-pagination
background
v-model:currentPage="currentPage4"
:page-sizes="[20, 30, 40, 50]"
:page-size="20"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
>
</el-pagination>
setup() {
const state = reactive({
pageSize: 20,
page: 1,
total: 0,
});
const handleSizeChange =