0.0.3 • Published 4 years ago
@sbc-fe/vue-virtual-table v0.0.3
Vue 高性能表格组件
- 基于 vue-virtual-scroll-list 虚拟列表滚动方案
- 放弃
table
标签, 采用div
+flex
渲染元素
Props
名称 | 说明 | 类型 | 默认值 | 必填 |
---|---|---|---|---|
bordered | 是否展示外边框和列边框 | boolean | - | ? |
dataSource | 列表数据 | any[] | [] | ? |
dataKey | 列表 key 的字段名 | string | - | ! |
estimateSize | 每行的预估大小 (高度) | number | 30 | ? |
pageMode | 页面滚动模式 | boolean | true | ? |
columns | 列配置 | ColumnsType[] | [] | ? |
ColumnsType
名称 | 说明 | 类型 | 默认值 | 必填 |
---|---|---|---|---|
align (未实现) | 对齐方式 | left | right | center | left | ? |
className | 列样式类名 | string | - | ? |
dataIndex | 数据对应的 key | string | - | ? |
ellipsis (未实现) | 超过宽度将自动省略 | boolean | - | ? |
fixed | 列是否固定 | left | right | - | ? |
render | 自定义单元格渲染函数 | (rowData) => VNode | - | ? |
title (未测试) | 表头显示的文字 | string | - | ? |
width | 列宽度 (IE 无效) | number | string | - | ? |
__dataValue
为保留字段, 用于渲染列时传递参数, 请勿在 columns 中配置