vue3-virtual-list

2,858 31
Install
npm install vue3-virtual-list
Latest Version:1.0.2
Vue:3
License:MIT
Last Updated:May 8, 2021
Links: GitHub  ·  npm
Maintainer: waningflow

vue3-virtual-list

npm downloads vue3

Scroll list for big acount of data. Based on Vue3.

live demo

Install

yarn add vue3-virtual-list

Example

<template>
  <div class="list-container">
    <VirtualList :data="dataSource">
      <template v-slot="{ item, index }">
        <div class="item-container">
          <div class="cell cell-index">{{ index + 1 }}</div>
          <div class="cell">{{ item.name }}</div>
          <div class="cell">{{ item.email }}</div>
          <div class="cell">{{ item.address }}</div>
        </div>
      </template>
    </VirtualList>
  </div>
</template>

<script>
  import { VirtualList } from 'vue3-virtual-list';
  import { mock } from './utils';

  export default {
    data() {
      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

Related Packages

@eosway/one-seamless-scroll

Vue 3 seamless scroll component for small and medium list display.

568 1
easyscroll

this is a tiny scroll bar plugin for vue2.0

871 41
@glhrmoura/vue-virtualize

Headless virtualization for Vue 3 lists, grids, and tables

1,371
vue-dragscroll

vue directive to make a scrollable element scroll by draging to the scroll direc...

1,541,547 264
vue3-smooth-scroll

Simple vue smooth scroll

209,775 34

Version History

Version Released Vue License
1.0.2 ^3.0.0 MIT
1.0.1 ^3.0.0 MIT
1.0.0 ^3.0.0 MIT
Pre-releases (7)
Version Released Vue License
1.0.0-alpha7 ^3.0.0 MIT
1.0.0-alpha6 ^3.0.0 MIT
1.0.0-alpha5 ^3.0.0
1.0.0-alpha4 ^3.0.0
1.0.0-alpha3 ^3.0.0