문서 탐색

UIPagination

페이지 사이를 이동합니다.

기본 사용법

목록의 페이지 이동

전체 항목 수와 페이지당 항목 수를 지정합니다. 현재 페이지와 이동 버튼, 생략 부호가 한 줄에 표시됩니다.

<script setup lang="ts">
import { UIPagination } from "@connextable/ui";
</script>

<template>
  <UIPagination :total="240" :default-items-per-page="20" />
</template>

설정과 동작

인접 페이지 수 조절

현재 페이지 양쪽에 한 페이지씩 표시하고 떨어진 범위는 생략합니다.

첫 페이지와 마지막 페이지로 이동

범위의 양 끝으로 곧바로 이동합니다. 이미 도착한 방향의 버튼은 비활성화됩니다.

데이터가 없을 때

빈 결과에서는 이동 항목이 없는 상태를 확인합니다.

페이지 크기 변경

한 페이지에 표시할 수를 바꾸면 전체 페이지 수가 달라집니다.

구성 컴포넌트

구조와 배치

UIPaginationItem

루트에 등록된 값 하나를 표시하고 상호작용을 연결합니다.

탐색과 동작

UIPaginationFirst

첫 페이지로 이동합니다.

첫 페이지와 마지막 페이지로 이동 예제
UIPaginationPrevious

직전 항목, 단계 또는 페이지로 이동합니다.

UIPaginationNext

다음 항목, 단계 또는 페이지로 이동합니다.

UIPaginationLast

마지막 페이지로 이동합니다.

첫 페이지와 마지막 페이지로 이동 예제

주요 API

속성과 모델

v-model타입number | undefined

현재 페이지 번호를 외부 상태에 연결합니다.

인접 페이지 수 조절 예제
total타입number

전체 항목 수입니다.

인접 페이지 수 조절 예제
default-items-per-page타입number | undefined

초기 페이지별 항목 수입니다.

목록의 페이지 이동 예제
items-per-page타입number | undefined

v-model로 페이지를 제어할 때 함께 지정할 페이지당 항목 수입니다.

인접 페이지 수 조절 예제

슬롯

#default타입(state: PaginationRootSlotProps) => unknown

페이지 버튼과 생략 구분을 포함한 items를 제공합니다.

첫 페이지와 마지막 페이지로 이동 예제
전체 속성, 이벤트와 슬롯

UIPagination

total필수
number
model-value
number | undefined
default-value
number | undefined
items-per-page
number | undefined
default-items-per-page
number | undefined
sibling-count
number | undefined
show-edges
boolean | undefined
show-controls
boolean | undefined
disabled
boolean | undefined
readonly
boolean | undefined
label
string | undefined
get-page-label
((page: number) => string) | undefined
get-control-label
((control: PaginationControl) => string) | undefined
as
PrimitiveAs | undefined
as-child
boolean | undefined
@update:model-value
(page: number) => any
@update:items-per-page
(size: number) => any
#default
(state: PaginationRootSlotProps) => unknown

UIPaginationItem

as
PrimitiveAs | undefined
as-child
boolean | undefined
item필수
PaginationItem
#default
(props: PaginationItemSlotProps) => VNodeChild

UIPaginationFirst

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
() => VNodeChild

UIPaginationPrevious

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
() => VNodeChild

UIPaginationNext

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
() => VNodeChild

UIPaginationLast

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
() => VNodeChild