We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec824e2 commit 9773320Copy full SHA for 9773320
src/components/pagination/index.ts
@@ -1,6 +1,8 @@
1
import { computed, toRef } from 'vue-demi'
2
import {
3
- getPageItems, getPageRange, PAGE_PADDING,
+ getPageItems,
4
+ getPageRange,
5
+ PAGE_PADDING,
6
} from './utils/calculate-page'
7
8
interface PaginationProps {
@@ -40,8 +42,8 @@ export function usePagination (props: PaginationProps) {
40
42
return getPageItems(page.value, totalPageCount.value, displayLimit.value)
41
43
})
44
- const canNext = computed(() => page.value !== totalPageCount.value)
- const canPrev = computed(() => page.value !== 1)
45
+ const canNext = computed(() => page.value < totalPageCount.value)
46
+ const canPrev = computed(() => page.value > 1)
47
48
return {
49
pageItems,
0 commit comments