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