The Pagination component provides a customizable navigation interface for paginated content. It supports first/last, previous/next buttons, and page number display with ellipsis for large page ranges.
<!-- Show 2 pages around current page, 1 at boundaries --><el-dm-pagination total="100" current="50" siblings="2" boundaries="1"></el-dm-pagination><!-- Show 3 pages around current page, 2 at boundaries --><el-dm-pagination total="100" current="50" siblings="3" boundaries="2"></el-dm-pagination>
Events
Event
Detail
Description
change
{ page: number }
Fired when the current page changes
Event Handling
const pagination = document.querySelector('el-dm-pagination');pagination.addEventListener('change', (e) => { console.log('Page changed to:', e.detail.page); // Fetch data for the new page fetchPageData(e.detail.page);});