Skip to content

Commit 45fd9a9

Browse files
committed
chore: fix types
1 parent 9d77fff commit 45fd9a9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/ui/src/components/DataVirtualList.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<script setup lang="ts" generic="T">
2-
// @ts-expect-error missing types
32
import { DynamicScroller, DynamicScrollerItem } from 'vue-virtual-scroller'
43
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css'
54
@@ -22,15 +21,20 @@ defineSlots<{
2221
v-slot="{ item, active, index }"
2322
:items="items"
2423
:min-item-size="30"
25-
:key-field="keyProp"
24+
:key-field="(keyProp as string)"
2625
page-mode
2726
>
2827
<DynamicScrollerItem
29-
:item="item"
28+
:item="(item as T)"
3029
:active="active"
3130
:data-index="index"
3231
>
33-
<slot v-bind="{ key: item[keyProp] }" :item="item" :index="index" :active="active" />
32+
<slot
33+
v-bind="{ key: (item as T)[keyProp] }"
34+
:item="(item as T)"
35+
:index="index"
36+
:active="active"
37+
/>
3438
</DynamicScrollerItem>
3539
</DynamicScroller>
3640
</template>

0 commit comments

Comments
 (0)