Skip to content
Projects

About

【Continuously updated】⚡️ A high-performance virtual (scrolling) list component for Vue 2 and Vue 3. Lightweight at 5 KB, renders millions of items, scrolls at full frame rate, and supports a wide range of use cases. 📑 [Vue virtual list] [Vue virtual scrolling list] [Vue virtual tree] [vue-virtual-list] [vue-virtual-scroll-list] [vue-virtual-scroller] [vue-virt-tree]

Web & App Development

How these counts are measured

Measured star growth

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

vue-virt-list — Vue 2 / Vue 3 虚拟列表与虚拟树

支持 Vue 2 与 Vue 3 的原生滚动虚拟列表,适用于动态行高、无限加载与聊天列表。

Virtual lists and trees for Vue 2 and Vue 3, with native scrolling and dynamic item heights.

中文文档 · English docs · 在线示例

vue-virt-list:Vue 2 / Vue 3 虚拟列表

Downloads Version License

三个项目如何选择 / Choose a project

你的需求 项目 框架支持
Vue 虚拟列表、虚拟树,需要原生滚动行为 vue-virt-list(本项目) Vue 2 / Vue 3
跨框架虚拟列表、树、网格及流式 AI 聊天 virt-list Vue 2 / Vue 3、React 16.8+、原生 JS
合并单元格、固定行列、筛选和编辑等完整表格能力 virt-table Vue 3、React 18+、原生 JS

新版 virt-list 使用 JavaScript 管理位移与自绘滚动条,并非原地升级。 现有项目满足需求,或依赖原生滚动行为时,可以继续使用 vue-virt-list。 迁移前请对照 API、样式引入与滚动行为。阅读选型说明。

English: Keep vue-virt-list for native Vue scrolling; choose virt-list for cross-framework lists and streaming chat, or virt-table for a full data grid. The newer libraries are not drop-in replacements. Selection guide.

体验新版流式聊天 · 体验虚拟表格与合并单元格

Documentation

To check out docs, visit vue-virt-list

👉 Advantages

Quick Start

npm install vue-virt-list -S

Options API

<template>
  <div style="width: 500px; height: 400px">
    <VirtList itemKey="id" :list="list" :itemPreSize="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>

Composition API

<template>
  <div style="width: 500px; height: 400px">
    <VirtList itemKey="id" :list="list" :itemPreSize="20">
      <template #default="{ itemData, index }">
        <div>{{ index }} - {{ itemData.id }} - {{ itemData.text }}</div>
      </template>
    </VirtList>
  </div>
</template>

<script setup lang="ts">
  import { ref, shallowRef } from 'vue';
  import { VirtList } from 'vue-virt-list';
  const list = ref([{ id: 0, text: 'text' }]);

  // 大数据建议使用 shallowRef: https://kolarorz.github.io/vue-virt-list/guide/instructions#shallowref
  // const list = shallowRef([{ id: 0, text: 'text' }])
</script>

WeChat

有问题可扫码加好友进入技术交流群(备注github账号名&vue-virt-list)

Sponsor

开源不易,如果帮助到你,请作者喝杯咖啡吧~

感谢您的慷慨

  • AliPay

    • **丹
    • **平
    • **理
  • WechatPay

    • 甜言蜜语说给左耳听

Explore related projects

Loading…