fix-issue-#246 (#248)
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user