Skip to content

功能

只做上下页,无需数量total, page, pagesize。最后一页可能为空(可以用额外逻辑规避),适合大数据量分页,因为用户不会翻到最后一页,样式风格和el-pagination保持一致

功能示例

展示区

最小示例

vue
<template>
    <Wrapper>
        <HEasyPagination v-model:current-page="p" :have-next="haveNext" />
    </Wrapper>
</template>

<script lang="ts" setup>
import { computed, ref } from 'vue'
import Wrapper from '@/components/simple-wrapper.vue'
import HEasyPagination from '../index.vue'

const p = ref(1)
const haveNext = computed(() => (p.value < 3))
</script>

API