1.0.1 • Published 9 months ago
tl-virtual-list v1.0.1
简要描述
tl-virtual-list主要功能是一个虚拟列表容器,对于前端业务中同时需要千条、万条以上的列表数据渲染有着非常好的性能
安装
npm install tl-virtual-list
引入
import TlVirtualList from 'tl-virtual-list'
import 'tl-virtual-list/tl-virtual-list.css'
全局注册
Vue.use(TlVirtualList)
页面使用
<TlVirtualList :list="list" :total="total" :contentHeight="contentHeight" :itemHeight="itemHeight" style="width:800px;">
<template slot-scope="scope">
<span>{{scope.item}}</span>
</template>
</TlVirtualList>
参数名称
list 列表数组数据
total 列表数据总条数
contentHeight 列表容器高度
itemHeight 列表每一行高度
scope.item 列表插槽对应的当前行数据