To check out docs, visit vue-virt-list
npm install vue-virt-list -S
<template>
<div style="width: 500px; height: 400px">
<VirtList itemKey="id" :list="list" :minSize="20">
<template #default="{ itemData, index }">
<div>{{ index }} - {{ itemData.id }} - {{ itemData.text }}</div>
</template>
</VirtList>
</div>
</template>
<script>
import { VirtList } from 'vue-virt-list';
export default {
components: { VirtList },
data() {
return {
list: [{ id: 0, text: 'text' }],
};
},
};
</script>
<template>
<div style="width: 500px; height: 400px">
<VirtList itemKey="id" :list="list" :minSize="20">
<template #default="{ itemData, index }">
<div>{{ index }} - {{ itemData.id }} - {{ itemData.text }}</div>
</template>
</VirtList>
</div>
</template>
<script setup lang="ts">
import { VirtList } from 'vue-virt-list';
const list = [{ id: 0, text: 'text' }];
</script>