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

View File

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