chore: upgrade to nuxt v3.5 and vue v3.3 (#2132)

This commit is contained in:
Daniel Roe 2023-05-29 02:16:34 -05:00 committed by GitHub
parent ad0725e9ae
commit 897968027c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 2325 additions and 2062 deletions

View file

@ -3,6 +3,7 @@
import { DynamicScroller } from 'vue-virtual-scroller'
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
import type { Paginator, WsEvents } from 'masto'
import type { UnwrapRef } from 'vue'
const {
paginator,
@ -23,23 +24,23 @@ const {
}>()
defineSlots<{
default: {
default: (props: {
items: U[]
item: U
index: number
active?: boolean
older?: U
newer?: U // newer is undefined when index === 0
}
items: {
items: U[]
}
updater: {
older: U
newer: U // newer is undefined when index === 0
}) => void
items: (props: {
items: UnwrapRef<U[]>
}) => void
updater: (props: {
number: number
update: () => void
}
loading: {}
done: {}
}) => void
loading: (props: {}) => void
done: (props: {}) => void
}>()
const { t } = useI18n()
@ -83,25 +84,23 @@ defineExpose({ createEntry, removeEntry, updateEntry })
page-mode
>
<slot
:key="item[keyProp]"
:item="item"
:active="active"
:older="items[index + 1]"
:newer="items[index - 1]"
:older="items[index + 1] as U"
:newer="items[index - 1] as U"
:index="index"
:items="items"
:items="items as U[]"
/>
</DynamicScroller>
</template>
<template v-else>
<slot
v-for="item, index of items"
:key="(item as any)[keyProp]"
:item="item"
:older="items[index + 1]"
:newer="items[index - 1]"
:item="item as U"
:older="items[index + 1] as U"
:newer="items[index - 1] as U"
:index="index"
:items="items"
:items="items as U[]"
/>
</template>
</slot>