Hi @msslgomez
I never used this package but based on the documentation you need to pass the total items (you already do this), current-page number and page-size, based on those variables the pagination can create the pager.
Example, you have 45 items, you want to show 10 items on a page. So you pass
Total: 45
Page-size: 10
current-page: 1
You will see something like 1 | 2 | 3 | 4 | 5
If you click on another page item, event handleCurrentChange will triggered.
handleCurrentChange(val) {
console.log(`current page: ${val}`);
},
Based on the new current page you can do an axios request for example and getting the next/previous 10 items for in you table. I assume :data="displayData" is the data for in el-table?
Something like:
handleCurrentChange(val) {
axios.get("your-url-to-get-new-data?page=" + ${val})
.then(response => {
// update displayData
})
},