From 56ab1633691a8b453499e0a06b70c4d06ac65a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Tue, 10 Jan 2023 01:22:20 +0800 Subject: [PATCH] fix(paginator): empty when count equals button --- composables/paginator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composables/paginator.ts b/composables/paginator.ts index 90950cc2..3b6c4e84 100644 --- a/composables/paginator.ts +++ b/composables/paginator.ts @@ -67,7 +67,7 @@ export function usePaginator( if (!result.done && result.value.length) { const preprocessedItems = preprocess([...nextItems.value, ...result.value] as (U | T)[]) const itemsToShowCount - = preprocessedItems.length < buffer + = preprocessedItems.length <= buffer ? preprocessedItems.length : preprocessedItems.length - buffer ;(nextItems.value as U[]) = preprocessedItems.slice(itemsToShowCount)