Phân trang & Breadcrumb
Phân trang có dấu ba chấm, nút đầu/cuối, kiểu tách rời, bo tròn, nhiều kích thước, dòng tổng số và chọn số mục/trang — mọi nhãn đều được dịch. Breadcrumb có icon.
Phân trang
Phân trang
vue
<div class="thl-stack">
<ThlPagination v-model:page="page" :total="200" show-first-last show-total />
<ThlPagination v-model:page="page" v-model:page-size="size" :total="200" :page-sizes="[10, 25, 50]" rounded size="sm" />
<ThlPagination v-model:page="page" :total="200" split size="lg" :max-pages="5" />
</div>tsx
const [page, setPage] = useState(3);
<Pagination page={page} total={200} onChange={setPage} showFirstLast showTotal />
<Pagination page={page} total={200} onChange={setPage} pageSizes={[10, 25, 50]} onPageSizeChange={setSize} rounded size="sm" />html
<thl-pagination [(page)]="page" [total]="200" showFirstLast [showTotal]="true" />
<thl-pagination [(page)]="page" [(pageSize)]="size" [total]="200" [pageSizes]="[10, 25, 50]" rounded size="sm" />Breadcrumb
Breadcrumb
vue
<ThlBreadcrumb :items="[{ label: 'Dashboard', href: '#', icon: 'house' }, { label: 'UI Elements', href: '#' }, { label: 'Buttons' }]" />tsx
<Breadcrumb items={[{ label: 'Dashboard', href: '/', icon: 'house' }, { label: 'UI Elements', href: '#' }, { label: 'Buttons' }]} />html
<thl-breadcrumb [items]="[{ label: 'Dashboard', href: '/', icon: 'house' }, { label: 'Buttons' }]" />API
Pagination
<ThlPagination> · import { ThlPagination } from '@thl-ui/vue'
| Prop | Kiểu | Mặc định |
|---|---|---|
page* | number | — |
total* | number | — |
pageSize | number | 10 |
maxPages | number | — |
size | string | — |
showTotal | boolean | — |
showFirstLast | boolean | — |
split | boolean | — |
rounded | boolean | — |
pageSizes | array | — |
ariaLabel | string | — |
Sự kiện: update:pageupdate:pageSizechange
Breadcrumb
<ThlBreadcrumb> · import { ThlBreadcrumb } from '@thl-ui/vue'
| Prop | Kiểu | Mặc định |
|---|---|---|
items* | array | — |
Slot: link