feat: more list support (#1479)
This commit is contained in:
parent
9d353fa07b
commit
e393049f04
8 changed files with 212 additions and 1 deletions
|
@ -11,6 +11,7 @@ const {
|
|||
virtualScroller = false,
|
||||
eventType = 'update',
|
||||
preprocess,
|
||||
noEndMessage = false,
|
||||
} = defineProps<{
|
||||
paginator: Paginator<T[], O>
|
||||
keyProp?: keyof T
|
||||
|
@ -18,6 +19,7 @@ const {
|
|||
stream?: Promise<WsEvents>
|
||||
eventType?: 'notification' | 'update'
|
||||
preprocess?: (items: (U | T)[]) => U[]
|
||||
noEndMessage?: boolean
|
||||
}>()
|
||||
|
||||
defineSlots<{
|
||||
|
@ -84,7 +86,7 @@ const { items, prevItems, update, state, endAnchor, error } = usePaginator(pagin
|
|||
<slot v-if="state === 'loading'" name="loading">
|
||||
<TimelineSkeleton />
|
||||
</slot>
|
||||
<slot v-else-if="state === 'done'" name="done">
|
||||
<slot v-else-if="state === 'done' && !noEndMessage" name="done">
|
||||
<div p5 text-secondary italic text-center>
|
||||
{{ t('common.end_of_list') }}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue