-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add BasePagination demos with different rounded styles
- Loading branch information
1 parent
829d89b
commit b43cc31
Showing
1 changed file
with
87 additions
and
0 deletions.
There are no files selected for viewing
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,87 @@ | ||
<script setup lang="ts"> | ||
definePageMeta({ | ||
title: 'BasePagination', | ||
icon: 'system-uicons:circle-menu', | ||
description: 'Pagination component', | ||
section: 'base', | ||
}) | ||
const route = useRoute() | ||
const currentPage = computed(() => { | ||
try { | ||
return Number.parseInt(route.query.page as string) || 1 | ||
} catch {} | ||
return 1 | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<NuiPreviewContainer title="BasePagination"> | ||
<NuiPreview | ||
title="Rounded: none" | ||
description="Pagination component radius none" | ||
> | ||
<BasePagination | ||
:item-per-page="8" | ||
:total-items="512" | ||
:current-page="currentPage" | ||
:max-links-displayed="5" | ||
rounded="none" | ||
/> | ||
</NuiPreview> | ||
|
||
<NuiPreview | ||
title="Rounded: sm" | ||
description="Pagination component radius sm" | ||
> | ||
<BasePagination | ||
:item-per-page="8" | ||
:total-items="512" | ||
:current-page="currentPage" | ||
:max-links-displayed="5" | ||
rounded="sm" | ||
/> | ||
</NuiPreview> | ||
|
||
<NuiPreview | ||
title="Rounded: md" | ||
description="Pagination component radius md" | ||
> | ||
<BasePagination | ||
:item-per-page="8" | ||
:total-items="512" | ||
:current-page="currentPage" | ||
:max-links-displayed="5" | ||
rounded="md" | ||
/> | ||
</NuiPreview> | ||
|
||
<NuiPreview | ||
title="Rounded: lg" | ||
description="Pagination component radius lg" | ||
> | ||
<BasePagination | ||
:item-per-page="8" | ||
:total-items="512" | ||
:current-page="currentPage" | ||
:max-links-displayed="5" | ||
rounded="lg" | ||
/> | ||
</NuiPreview> | ||
|
||
<NuiPreview | ||
title="Rounded: full" | ||
description="Pagination component radius full" | ||
> | ||
<BasePagination | ||
:item-per-page="8" | ||
:total-items="512" | ||
:current-page="currentPage" | ||
:max-links-displayed="5" | ||
rounded="full" | ||
/> | ||
</NuiPreview> | ||
</NuiPreviewContainer> | ||
</div> | ||
</template> |