@beisen-phoenix/table
## Table
Last updated 7 months ago by beisencorp .
ISC · Original npm · Tarball · package.json
$ cnpm install @beisen-phoenix/table 
SYNC missed versions from official npm registry.

API

Table

参数 说明 类型 默认值 是否必传 备注
className 扩展className string phoenix-table
bordered 是否显示外边框 boolean false
columnHighlight 单击列,整列高亮效果 boolean true
rowsInView 单次render的最大行数 number 0 单次render的最大行数。Table 采用了lazy render的方式来优化在大量数据下的性能,如果你的表格显示的高度超出了20条,可以调整rowsInView的值。为0表示禁用懒加载。
rowKey 生成每一项key的辅助方法 function(obj) 或 string true 0
hover 是否数据行鼠标悬浮高亮效果 boolean true
size 尺寸(作用于行高), 可填值 ['large', 'middle', 'small'] string 'middle'
striped 是否显示交错斑马底纹 string 或 ReactNode false
useContainerScroll 是否使用容器的滚动条 boolean false 开启后,头部不会锁定
height 表格高度 number - 开启后,头部不会锁定
loading 数据加载中,为true时会展示一个默认的小菊花组件,可以传入一个自定义的Spin代替 bool 或 ReactNode false
loadingView 自定义的Loaidng组件 ReactNode false 可以通过传递给loadiView一个自定义组件覆盖默认的空视图
emptyView 空数据效果 ReactNode 可以通过传递给emptyView一个自定义组件覆盖默认的空视图
enableWheelScroll 是否启用touch滚动 boolean true 默认支持滚动条以及touch滚动,可禁用touch滚动
columns 数组,见Column Column[] -
columnResizable 列宽是否可拖拽宽度,默认为true,如果想禁用某列拖拽宽度,可以给单独列设置columnResizable boolean true
columnDefaultWidth 默认列宽的宽度,仅在未设置列宽的场景下生效。默认为140,如果认为140过大,可以自定义设置,但是为了体验,建议不小于56. boolean 140 强烈建议此值设置不小于56
sorter 表格统一排序函数,参数分别为 Column.sorter 和 排序方式 func 强烈建议此值设置不小于56
fit 是否启用列宽自适应 boolean true 当为true,会自适应宽度; 为false,会可以单独设置宽度,并且不随浏览器窗口大小改变调整
ellipsis 内容超过单元格宽度是否显示...,默认为false,也就是会换行 boolean false 强烈建议不要设置为true,会导致性能问题(数据量过大)
fixed 滚动条显示设置,可填值 ['both', 'x', 'y'] string 'both' 如果确定不会出现x轴滚动条,可以设置为 y,其他情况类似,无特殊需求,不建议调整
expandKeys 展开的行的key数组 array []
expandedRowRender 展开的行内容 function 如果是可展开,此项是必填
dataSource 数据源 object[]
pagination 分页配置,参考下面pagination object pagination: { current: 1, pageSize: 15, },
settingPanel 表格设置,参考下面settingPanel object pagination: { current: 1, pageSize: 15, },
rowSelection 表格选中设置,参考下面rowSelection object {}

pagination

参数 说明 类型 默认值 是否必传 备注
current 当前页数 number 1
total 总数 number -
pageSize 每页显示条数 number 15
capacityOptions 显示条数配置 number[] [15, 30, 60, 100]
showSelectCount 底部是否显示'已选中N条'文本 boolean true
showSelectAllPageCheckbox 底部是否显示跨页全选 boolean false
selectAllPageCheckbox 底部跨页全选是否选中 boolean false
onChange 当前页数、每页显示条数发生变化回调时间 function -
  • 其他参考pagination组件

rowSelection

参数 说明 类型 默认值 是否必传 备注
type 多选或者单选, 可选值 'multiple', 'single' string
disabledAllCheckbox 禁用头部全选复选框 boolean -
selectedRowKeys 默认选中项,根据rowKey进行匹配 string[] []
onChange 选中项发生变化回调时间 function

columns

参数 说明 类型 默认值 是否必传 备注
align 单元格内容排布方式,可选 ['left', 'center', 'right'] string 'left'
fixed 锁定列,可选['left', 'right'], string - 如果相邻的多列需要锁定,只需指定最外侧的column即可
key 列的key,默认使用index string | number -
render 表格内容生成函数; function d: 当前行数据i: 当前行索引为了使用方便,可以传入一个数据的key,如 'id',相当于 (d) => { return d.id }
dataIndex 列数据在数据项中对应的 key string -
title 列头显示文字 string | ReactNode -
width 列宽 number 140

Current Tags

  • 3.3.55                                ...           latest (7 months ago)
  • 3.2.44-rc.1                                ...           rc (9 months ago)

223 Versions

  • 3.3.55                                ...           7 months ago
  • 3.3.54                                ...           7 months ago
  • 3.3.53                                ...           7 months ago
  • 3.3.52                                ...           8 months ago
  • 3.3.51                                ...           8 months ago
  • 3.3.50                                ...           8 months ago
  • 3.3.48                                ...           8 months ago
  • 3.3.47                                ...           8 months ago
  • 3.3.46                                ...           8 months ago
  • 3.3.45                                ...           8 months ago
  • 3.3.43                                ...           8 months ago
  • 3.3.42                                ...           8 months ago
  • 3.3.41-beta.1                                ...           8 months ago
  • 3.3.41                                ...           8 months ago
  • 3.3.39                                ...           8 months ago
  • 3.3.38                                ...           8 months ago
  • 3.3.37                                ...           8 months ago
  • 3.3.36                                ...           8 months ago
  • 3.3.35                                ...           8 months ago
  • 3.3.34                                ...           8 months ago
  • 3.3.33                                ...           8 months ago
  • 3.3.32                                ...           8 months ago
  • 3.3.31                                ...           8 months ago
  • 3.3.29                                ...           8 months ago
  • 3.3.28                                ...           8 months ago
  • 3.3.27                                ...           8 months ago
  • 3.3.26                                ...           8 months ago
  • 3.3.25                                ...           8 months ago
  • 3.3.24                                ...           8 months ago
  • 3.3.23                                ...           8 months ago
  • 3.3.22                                ...           8 months ago
  • 3.3.21                                ...           8 months ago
  • 3.3.20                                ...           8 months ago
  • 3.3.19                                ...           8 months ago
  • 3.3.18                                ...           8 months ago
  • 3.3.17                                ...           8 months ago
  • 3.3.16                                ...           8 months ago
  • 3.3.15                                ...           8 months ago
  • 3.3.14                                ...           8 months ago
  • 3.3.13                                ...           8 months ago
  • 3.3.12                                ...           8 months ago
  • 3.3.11                                ...           8 months ago
  • 3.3.10                                ...           8 months ago
  • 3.3.9                                ...           8 months ago
  • 3.3.8                                ...           8 months ago
  • 3.3.7                                ...           8 months ago
  • 3.3.6                                ...           8 months ago
  • 3.3.5                                ...           8 months ago
  • 3.2.80-beta.1                                ...           8 months ago
  • 3.2.80                                ...           8 months ago
  • 3.3.4                                ...           8 months ago
  • 3.3.3                                ...           8 months ago
  • 3.3.1                                ...           8 months ago
  • 3.3.0                                ...           8 months ago
  • 3.2.97                                ...           8 months ago
  • 3.2.95                                ...           8 months ago
  • 3.2.94                                ...           8 months ago
  • 3.2.93                                ...           8 months ago
  • 3.2.92                                ...           8 months ago
  • 3.2.90                                ...           8 months ago
  • 3.2.88                                ...           8 months ago
  • 3.2.87                                ...           8 months ago
  • 3.2.86                                ...           8 months ago
  • 3.2.85                                ...           8 months ago
  • 3.2.84                                ...           8 months ago
  • 3.2.83                                ...           8 months ago
  • 3.2.82                                ...           8 months ago
  • 3.2.81                                ...           8 months ago
  • 3.2.79                                ...           8 months ago
  • 3.2.78                                ...           8 months ago
  • 3.2.76                                ...           8 months ago
  • 3.2.7-rc.1                                ...           8 months ago
  • 3.2.74                                ...           8 months ago
  • 3.2.73                                ...           8 months ago
  • 3.2.69-beta.1                                ...           8 months ago
  • 3.2.72                                ...           8 months ago
  • 3.2.70                                ...           8 months ago
  • 3.2.69                                ...           8 months ago
  • 3.2.68                                ...           8 months ago
  • 3.2.66                                ...           8 months ago
  • 3.2.64-beta.11                                ...           8 months ago
  • 3.2.65                                ...           8 months ago
  • 3.2.64-beta.1                                ...           8 months ago
  • 3.2.63                                ...           8 months ago
  • 3.2.61                                ...           8 months ago
  • 3.2.60                                ...           8 months ago
  • 3.2.59                                ...           8 months ago
  • 3.2.58                                ...           8 months ago
  • 3.2.57                                ...           8 months ago
  • 3.2.56                                ...           8 months ago
  • 3.2.55                                ...           8 months ago
  • 3.2.54                                ...           8 months ago
  • 3.2.47-beta.8                                ...           8 months ago
  • 3.2.47-beta.7                                ...           8 months ago
  • 3.2.53                                ...           8 months ago
  • 3.2.47-beta.6                                ...           8 months ago
  • 3.2.50                                ...           8 months ago
  • 3.2.47-beta.4                                ...           8 months ago
  • 3.2.47-beta.3                                ...           8 months ago
  • 3.2.47-alpha.3                                ...           8 months ago
  • 3.2.47-beta.2                                ...           8 months ago
  • 3.2.47-alpha.2                                ...           8 months ago
  • 3.2.48                                ...           8 months ago
  • 3.2.47-beta.1                                ...           8 months ago
  • 3.2.45-alpha.1                                ...           8 months ago
  • 3.2.47                                ...           8 months ago
  • 3.2.46                                ...           8 months ago
  • 3.2.45-beta.1                                ...           8 months ago
  • 3.2.45-beta.0                                ...           8 months ago
  • 3.2.45                                ...           8 months ago
  • 3.2.44-rc.4                                ...           8 months ago
  • 3.2.44-rc.3                                ...           8 months ago
  • 3.2.44-rc.2                                ...           8 months ago
  • 3.2.44-rc.1                                ...           9 months ago
  • 3.2.44                                ...           9 months ago
  • 3.2.43                                ...           9 months ago
  • 3.2.42                                ...           9 months ago
  • 3.2.41                                ...           9 months ago
  • 3.2.40                                ...           9 months ago
  • 3.2.39                                ...           9 months ago
  • 3.2.37                                ...           9 months ago
  • 3.2.35                                ...           9 months ago
  • 3.2.34                                ...           9 months ago
  • 3.2.33                                ...           9 months ago
  • 3.2.32                                ...           9 months ago
  • 3.2.31                                ...           9 months ago
  • 3.2.30                                ...           9 months ago
  • 3.2.29                                ...           9 months ago
  • 3.2.28                                ...           9 months ago
  • 3.2.27                                ...           9 months ago
  • 3.2.26                                ...           9 months ago
  • 3.2.25                                ...           9 months ago
  • 3.2.24                                ...           9 months ago
  • 3.2.23                                ...           9 months ago
  • 3.2.22                                ...           9 months ago
  • 3.2.21                                ...           9 months ago
  • 3.2.20                                ...           9 months ago
  • 3.2.19                                ...           9 months ago
  • 3.2.18                                ...           9 months ago
  • 3.2.17                                ...           9 months ago
  • 3.2.16                                ...           9 months ago
  • 3.2.15                                ...           9 months ago
  • 3.2.14                                ...           9 months ago
  • 3.2.12                                ...           9 months ago
  • 3.2.10                                ...           9 months ago
  • 3.2.9                                ...           9 months ago
  • 3.2.8                                ...           9 months ago
  • 3.2.7                                ...           9 months ago
  • 3.2.6                                ...           9 months ago
  • 3.2.5                                ...           9 months ago
  • 3.2.4                                ...           9 months ago
  • 3.2.3                                ...           9 months ago
  • 3.2.2                                ...           9 months ago
  • 3.2.1                                ...           9 months ago
  • 3.2.0                                ...           9 months ago
  • 3.1.99                                ...           9 months ago
  • 3.1.98                                ...           9 months ago
  • 3.1.97                                ...           9 months ago
  • 3.1.96                                ...           9 months ago
  • 3.1.95                                ...           9 months ago
  • 3.1.94                                ...           9 months ago
  • 3.1.92                                ...           9 months ago
  • 3.1.91                                ...           9 months ago
  • 3.1.90                                ...           9 months ago
  • 3.1.89                                ...           9 months ago
  • 3.1.88                                ...           9 months ago
  • 3.1.87                                ...           9 months ago
  • 3.1.86                                ...           9 months ago
  • 3.1.85                                ...           9 months ago
  • 3.1.84                                ...           9 months ago
  • 3.1.83                                ...           9 months ago
  • 3.1.82                                ...           9 months ago
  • 3.1.81                                ...           9 months ago
  • 3.1.80                                ...           9 months ago
  • 3.1.79                                ...           9 months ago
  • 3.1.78                                ...           9 months ago
  • 3.1.77                                ...           9 months ago
  • 3.1.76                                ...           9 months ago
  • 3.1.75                                ...           9 months ago
  • 3.1.74                                ...           9 months ago
  • 3.1.73                                ...           9 months ago
  • 3.1.72                                ...           9 months ago
  • 3.1.71                                ...           9 months ago
  • 3.1.70                                ...           9 months ago
  • 3.1.69                                ...           9 months ago
  • 3.1.68                                ...           9 months ago
  • 3.1.67                                ...           9 months ago
  • 3.1.65                                ...           9 months ago
  • 3.1.64                                ...           10 months ago
  • 3.1.63                                ...           10 months ago
  • 3.1.62                                ...           10 months ago
  • 3.1.61                                ...           10 months ago
  • 3.1.60                                ...           10 months ago
  • 3.1.59                                ...           10 months ago
  • 3.1.58                                ...           10 months ago
  • 3.1.57                                ...           10 months ago
  • 3.1.56                                ...           10 months ago
  • 3.1.55                                ...           10 months ago
  • 3.1.53                                ...           10 months ago
  • 3.1.51                                ...           10 months ago
  • 3.1.49                                ...           10 months ago
  • 3.1.48                                ...           10 months ago
  • 3.1.47                                ...           10 months ago
  • 3.1.46                                ...           10 months ago
  • 3.1.45                                ...           10 months ago
  • 3.1.44                                ...           10 months ago
  • 3.1.43                                ...           10 months ago
  • 3.1.42                                ...           10 months ago
  • 3.1.41                                ...           10 months ago
  • 3.1.40                                ...           10 months ago
  • 3.1.39                                ...           10 months ago
  • 3.1.38                                ...           10 months ago
  • 3.1.37                                ...           10 months ago
  • 3.1.36                                ...           10 months ago
  • 3.1.35                                ...           10 months ago
  • 3.1.34                                ...           10 months ago
  • 3.1.33                                ...           10 months ago
  • 3.1.32                                ...           10 months ago
  • 3.1.31                                ...           10 months ago
  • 3.1.30                                ...           10 months ago
  • 3.1.29                                ...           10 months ago
  • 3.1.28                                ...           10 months ago
  • 3.1.25                                ...           10 months ago

Copyright 2014 - 2016 © taobao.org |