-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Pagination): add first and last page buttons (#842)
Co-authored-by: Benjamin Canac <[email protected]> Co-authored-by: Max Steinwand <[email protected]>
- Loading branch information
1 parent
9c05b3a
commit c5ce997
Showing
4 changed files
with
134 additions
and
9 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
docs/components/content/examples/PaginationExampleFirstLastSlots.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script setup> | ||
const page = ref(1) | ||
const items = ref(Array(55)) | ||
</script> | ||
|
||
<template> | ||
<UPagination v-model="page" :total="items.length" :ui="{ rounded: 'first-of-type:rounded-s-md last-of-type:rounded-e-md' }"> | ||
<template #first="{ onClick }"> | ||
<UTooltip text="First page"> | ||
<UButton icon="i-heroicons-arrow-uturn-left" color="primary" :ui="{ rounded: 'rounded-full' }" class="rtl:[&_span:first-child]:rotate-180 me-2" @click="onClick" /> | ||
</UTooltip> | ||
</template> | ||
|
||
<template #last="{ onClick }"> | ||
<UTooltip text="Last page"> | ||
<UButton icon="i-heroicons-arrow-uturn-right-20-solid" color="primary" :ui="{ rounded: 'rounded-full' }" class="rtl:[&_span:last-child]:rotate-180 ms-2" @click="onClick" /> | ||
</UTooltip> | ||
</template> | ||
</UPagination> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c5ce997
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ui – ./
ui-git-dev-nuxt-js.vercel.app
ui.nuxt.com
ui-nuxt-js.vercel.app