Merge pull request #7223 from xl495/master

fix(docs): Optimize the template structure of the Paginator component…
pull/7281/head
Tuğçe Küçükoğlu 2025-02-19 13:14:47 +03:00 committed by GitHub
commit a2af50308c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 9 deletions

View File

@ -40,16 +40,14 @@ export default {
basic: ` basic: `
<Paginator :rows="10" :totalRecords="120"> <Paginator :rows="10" :totalRecords="120">
<template #container="{ first, last, page, pageCount, prevPageCallback, nextPageCallback, totalRecords }"> <template #container="{ first, last, page, pageCount, prevPageCallback, nextPageCallback, totalRecords }">
<template #container="{ first, last, page, pageCount, prevPageCallback, nextPageCallback, totalRecords }"> <div class="flex items-center gap-4 border border-primary bg-transparent rounded-full w-full py-1 px-2 justify-between">
<div class="flex items-center gap-4 border border-primary bg-transparent rounded-full w-full py-1 px-2 justify-between"> <Button icon="pi pi-chevron-left" rounded text @click="prevPageCallback" :disabled="page === 0" />
<Button icon="pi pi-chevron-left" rounded text @click="prevPageCallback" :disabled="page === 0" /> <div class="text-color font-medium">
<div class="text-color font-medium"> <span class="hidden sm:block">Showing {{ first }} to {{ last }} of {{ totalRecords }}</span>
<span class="hidden sm:block">Showing {{ first }} to {{ last }} of {{ totalRecords }}</span> <span class="block sm:hidden">Page {{ page + 1 }} of {{ pageCount }}</span>
<span class="block sm:hidden">Page {{ page + 1 }} of {{ pageCount }}</span>
</div>
<Button icon="pi pi-chevron-right" rounded text @click="nextPageCallback" :disabled="page === pageCount - 1" />
</div> </div>
</template> <Button icon="pi pi-chevron-right" rounded text @click="nextPageCallback" :disabled="page === pageCount - 1" />
</div>
</template> </template>
</Paginator> </Paginator>
`, `,