refactor(status): rework edit history list

This commit is contained in:
三咲智子 2023-01-08 16:51:45 +08:00
parent 6308aa5c9a
commit c64106c98a
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
3 changed files with 38 additions and 24 deletions

View file

@ -22,7 +22,9 @@ const {
defineSlots<{
default: {
items: T[]
item: T
index: number
active?: boolean
older?: T
newer?: T // newer is undefined when index === 0
@ -61,6 +63,8 @@ const { items, prevItems, update, state, endAnchor, error } = usePaginator(pagin
:active="active"
:older="items[index + 1]"
:newer="items[index - 1]"
:index="index"
:items="items"
/>
</DynamicScroller>
</template>
@ -71,6 +75,8 @@ const { items, prevItems, update, state, endAnchor, error } = usePaginator(pagin
:item="item"
:older="items[index + 1]"
:newer="items[index - 1]"
:index="index"
:items="items"
/>
</template>
</slot>