Giter VIP home page Giter VIP logo

vue3-virtual-list's Introduction

vue3-virtual-list

基于vue3+ts的虚拟列表组件

下载

  • npm install vue3-base-virtual-list

参数

export interface Props {
  // 列表
  list: any[]
  // container 样式
  containerStyle?: style
  // container class
  containerClassName?: string
  // child 样式
  childStyle?: style
  // child class
  childClassName?: string
  // 高度
  height: number
  // 列表子项预估高度
  itemHeight: number
  //   滚动至底部的回调函数
  scrollButtonFn?: Function
}

使用

import virtualList from " vue3-base-virtual-list";
const list = Array.from({length: 1000}, (_, index) => index + 1)

<virtual-list :list="list" :height="300" :item-height="20">
   <template #default="{item}">
       <span>
      {{ item.data }}
     </span>
   </template>

 </virtual-list>

vue3-virtual-list's People

Contributors

flyhyy avatar

Stargazers

 avatar

Watchers

 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.