Animated Pagination
Vue 已实现 · 还原验收 0/1 · 上游演示 · 固定版本源码
预览
用法
vue
<script setup lang="ts">
import { Pagination } from 'beui-vue'
import { ref } from 'vue'
const page = ref(6)
</script>
<template><div class="paging"><Pagination v-model="page" :total-pages="20" /><output>Page {{ page }} of 20</output></div></template>
<style scoped>.paging { display: grid; justify-items: center; gap: 1rem; } output { font-size: .75rem; color: var(--beui-muted-foreground); }</style>API
v-model 同步当前页,totalPages 指定总页数,siblings 和 boundaries 调整可见页码。省略号可跳页。