feat(Pagination): allow using pagination buttons as links (#114)

This commit is contained in:
Neil Richter
2024-05-21 17:51:52 +02:00
committed by GitHub
parent e8dee1efe1
commit 5c5676edf9
2 changed files with 18 additions and 5 deletions

View File

@@ -3,5 +3,15 @@ const page = ref(5)
</script>
<template>
<UPagination v-model:page="page" :total="100" :sibling-count="1" show-edges />
<div class="flex flex-col gap-4">
<div class="flex flex-col gap-2">
<p>With buttons (default)</p>
<UPagination v-model:page="page" :total="100" :sibling-count="1" show-edges />
</div>
<div class="flex flex-col gap-2">
<p>With links</p>
<UPagination v-model:page="page" :total="100" :to="page => ({ query: { page } })" :sibling-count="1" show-edges />
</div>
</div>
</template>