fix-issue-#246 (#248)

This commit is contained in:
Sqrcz
2023-11-15 09:11:10 +01:00
committed by GitHub
parent d6dace18d0
commit 67091e1d90
2 changed files with 7 additions and 6 deletions

View File

@@ -1,17 +1,17 @@
<template>
<div class="vp-raw flex flex-col items-center justify-center text-center">
<fwb-pagination
v-model="currentPage"
v-model="currentPageA"
:layout="'table'"
:per-page="20"
:total-items="998"
class="mb-2"
/>
<fwb-pagination
v-model="currentPage"
v-model="currentPageB"
:layout="'table'"
:per-page="20"
:total-items="998"
:per-page="100"
:total-items="750"
large
/>
</div>
@@ -21,5 +21,6 @@
import { ref } from 'vue'
import { FwbPagination } from '../../../../src/index'
const currentPage = ref<number>(1)
const currentPageA = ref<number>(1)
const currentPageB = ref<number>(1)
</script>

View File

@@ -256,7 +256,7 @@ const pagesToDisplay = computed(() => {
const startItemsCount = computed(() => props.modelValue * props.perPage - props.perPage + 1)
const endItemsCount = computed(() => {
const count = props.modelValue * props.perPage + 1
const count = props.modelValue * props.perPage
if (!props.totalItems) return count
if (count > props.totalItems) return props.totalItems
return count