vue3-virtual-list
v1.0.2
Published
[](https://www.npmjs.com/package/vue3-virtual-list) [](https://www.npmjs.com/package/vue3-virtual-list) [ {
return {
dataSource: mock(100000),
};
},
components: {
VirtualList,
},
};
</script>
<style>
.list-container {
width: 800px;
height: 600px;
border: 2px solid #4caf50;
margin: 0 auto;
}
.item-container {
height: 40px;
display: flex;
flex-direction: row;
align-items: center;
border-bottom: 1px solid #ccc;
}
</style>Props
| name | type | description | required | default | | ---------- | ------ | ----------------------------------------------------------- | -------- | ------- | | data | Array | The array of data. Every item is a row. | Yes | | | dataKey | String | Field as key. | No | id | | itemSize | Number | The height in pixels of each row. | No | 40 | | poolBuffer | Number | How many rows will be rendered except for the visible ones. | No | 50 |
