react-virtuallist-an
v0.0.9-alpha.0
Published
Now I’m the model of a modern major general / The venerated Virginian veteran whose men are all / Lining up, to put me up on a pedestal / Writin’ letters to relatives / Embellishin’ my elegance and eloquence / But the elephant is in the room / The truth i
Downloads
4
Maintainers
Readme
根据业务需求封装的高性能 React 表格组件
参考 ali-react-table
安装
npm i react-virtuallist-an
特点
高性能,内置虚拟滚动,数据量较大时自动开启
简单灵活的 API,丰富的定制能力
实用的表格特性:表头吸顶 & 左侧/右侧锁列 & 粘性定位的滚动条
表格适用场景
需要用表格展示大量数据,对表格性能较为敏感
页面没有引入 React 组件库,需要一个尺寸较小的表格组件
原有表格组件可定制能力不够,需要更加灵活的表格组件
虚拟滚动
通过 dataSource 传入一个长度超过 5 万的数组,表格依旧流畅。当表格向下滚动时,BaseTable 默认会为表头设置 style.position=sticky,表头将会吸附在页面或滚动容器的顶部
留存矩阵与投入产出分析表格
BaseTable 提供了灵活且丰富的 API,方便上层根据各类业务需求对表格进行定制,定制的内容包括单元格内容与样式、鼠标事件回调等。
优化的加载图标位置
优化的加载图标位置,加载图标会位于表格的中心位置,并始终处于可见状态。
简单透视表格基于 BaseTable 的简单透视表格。一般来说,透视表展示的数据量较大,不过 BaseTable 内置的虚拟滚动保证了表格在大数据量下仍具有很好的性能,上层不需要过多担心性能问题。
兼容性说明
表格只兼容 react ^16.8.0 || ^17.0.0。
此外表格用到了大量较新的浏览器 API,只兼容较新版本的 PC 端浏览器或手机浏览器