Coder Social home page Coder Social logo

mr-yuhuashi / vue-tiny-virtual-list Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keno-lee/vue-virt-list

0.0 0.0 0.0 37.75 MB

⚡️ High performance & Full frame rate & Virtual render & Huge amount data (support vue2.x&vue3.x) 虚拟列表 虚拟滚动列表 高性能 百万级数据 满帧渲染

Home Page: https://keno-lee.github.io/vue-tiny-virtual-list/

JavaScript 1.71% TypeScript 55.25% HTML 0.61% Vue 42.42%

vue-tiny-virtual-list's Introduction

vue-tiny-virtual-list 虚拟列表 虚拟滚动列表

Downloads Version License

中文文档

👉 Advantages

👉 Live demo

Advantages

  • Tiny: 8K (gzipped 3k)
  • Works for both Vue 3 and 2 (Use vue-demi)
  • Millions of data, high performance, full frame rate rendering
  • Supports horizontal and vertical scrolling
  • Typescript support
  • Supports smooth scrolling upwards
  • Scroll without losing selection
  • O(1) complexity rolling increment calculation
  • Supports a variety of slots to choose from, and supports expansion in various scenarios (tables, wireless loading, chat rooms, merged cells, etc.)

Start

npm install vue-tiny-virtual-list -S
<template>
  <div style="width: 500px; height: 400px">
    <VirtualList itemKey="id" :list="list" :minSize="20">
      <template #default="{ itemData }">
        <div>{{ itemData.id }} - {{ itemData.text }}</div>
      </template>
    </VirtualList>
  </div>
</template>

<script>
  import { VirtualList } from 'vue-tiny-virtual-list';
  export default {
    components: { VirtualList },
    data() {
      return {
        list: [{ id: 0, text: 'text' }],
      };
    },
  };
</script>

Attributes

Name Description Type Default Required
list data list Array - false
itemKey list item id String Number - true
minSize Minimum size, the number in the visible area will be calculated based on this size Number - true
fixed Fixed height mode can improve performance Number - false
buffer When the amount of rendering is large and the scrolling white screen is serious, you can give values, and bufferTop and bufferBottom will be equal to buffer Number 0 false
bufferTop buffer for top Number 0 false
bufferBottom buffer for bottom Number 0 false
horizontal horizontal mode Boolean false false

slot

name Description
header header slot
footer footer slot
sticky-header sticky header slot
sticky-footer sticky footer slot

vue-tiny-virtual-list's People

Contributors

keno-lee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.