1.3.51-rc.10 • Published 6 years ago

@beisen-platform/platform-datatable v1.3.51-rc.10

Weekly downloads
15
License
ISC
Repository
-
Last release
6 years ago

DataTable使用方式如下

<DataTable
  {...this.tableDefin}   //table的元数据,平台配置生成
  loading={this.state.isTableFetching} //table组件loading状态
  singleChecked={this.props.singleChecked} //table是否是单选
  onSelect={this.handleDataRowChecked.bind(this)} //table 行选中之后的回调
  selectedData={this.props.resultsData} //当前table已经选中的数据
  reloadData={this.reloadDataTable.bind(this)} //重新刷新当前table
  onCrossPageSelectChanged={this.handleDataTableCrossPageSelect.bind(this)} //跨页全选状态选择后的回调实践
  tableSize={this.props.stretch ? 'stretch' : 'Auto'} //table组件的渲染的模式,stretch: 自动充满父容器,滚动条在table内部。Auto: table根据自身高度渲染,滚动条出现在外部
  tableContainer={this.props.tableContainer || dataGrid.parentElement}
  containerHeight={this.props.containerHeight} //提供一个计算好的高度,table渲染到这个高度内
  containerWidth={this.props.containerWidth} //提供一个计算好的宽度,table选择到这个宽度内
  mainObjectContext={this.props.mainObjectContext || null} //上下文相关,用于当当前table数据属于子对象的时候,mainObjectContext传递是主对象相关的信息,包含PObjectDataID,parentDataId,parentMetaObjName,用于行操作的逻辑处理
  ext_genColDef={this.genCustomColDef}
  ext_getColumns={this.genCustomColumns}
/>
属性说明
属性说明类型默认值
loadingtable组件loading状态boolfalse
singleCheckedtable是否是单选boolfalse
selectedDatatable默认选中数据的idsarray[]
onSelecttable行选中之后的回调函数,selectedItems:table选中行的所有数据,与metadata中的biz_data中行记录结构一致,outsideSelectedIds是selectedData的子集,排除了table操作过程中取消选中的那部分selectedData的数据function (selectedItems, outsideSelectedIds) {}-
reloadData重新加载table列表数据function (tableMetaData, reloadReson) {}[]
onCrossPageSelectChangedtable跨页全选点击回调function (isActive) {}bool
tableSizetable组件的渲染的模式,stretch: 自动充满父容器,滚动条在table内部。Auto: table根据自身高度渲染,滚动条出现在外部stringAuto
tableContainer配置tableSize为stretch的时候使用,父容器的DOMDOMtable组件所在的parentElement
containerHeight给table一个计算好的显式高度int-
containerWidth给table一个计算好的显式宽度int-
ext_genColDef重写某个列function (colData, index, column) {}-
ext_getColumns重写列(拿到所有的列)function (columns) {}-
自定义列渲染
let column = {
  key: string, //列唯一ID
  name: string, //列名
  title: string, //列表头显示
  sortable: bool, //是否需要排序
  visible: bool, //是否可见
  fixed: bool, // 是否fixed
  fixedWidth: colData.width ? +colData.width < 40 ? 40 : +colData.width : null // 后端接口给的宽度居然是 string 转换成数字再传递
  };

  column.render = (v, data, cellProps) => {
    console.log(v,data,cellProps);
    return (<div>自定义列渲染</div>);
  }
1.3.51-rc.10

6 years ago

1.3.51-rc.9

6 years ago

1.3.51-rc.7

6 years ago

1.3.51-rc.6

6 years ago

1.3.51-rc.5

6 years ago

1.3.51-rc.3

6 years ago

1.3.51-rc.2

6 years ago

1.3.51-rc.1

6 years ago

1.3.50-rc.6

6 years ago

1.3.50-rc.5

6 years ago

1.3.50-rc.4

6 years ago

1.3.50-rc.3

6 years ago

1.3.50-rc.2

6 years ago

1.3.50-rc.1

6 years ago

1.3.50

6 years ago

1.3.49

6 years ago

1.3.48

6 years ago

1.3.46

6 years ago

1.3.45

6 years ago

1.3.44

6 years ago

1.3.43

6 years ago

1.3.42

6 years ago

1.3.41

6 years ago

1.3.40

6 years ago

1.3.39

6 years ago

1.3.38

6 years ago

1.3.37

6 years ago

1.3.36

6 years ago

1.3.35-rc1

6 years ago

1.3.34-rc.11

6 years ago

1.3.34-rc.10

6 years ago

1.3.34-rc.9

6 years ago

1.3.34-rc.7

6 years ago

1.3.34-rc.6

6 years ago

1.3.34-rc.5

6 years ago

1.3.34-rc.4

6 years ago

1.3.34-rc.3

6 years ago

1.3.34-rc.2

6 years ago

1.3.34-rc.1

6 years ago

1.3.34

6 years ago

1.3.33

6 years ago

1.3.32

6 years ago

1.3.31

6 years ago

1.3.30

6 years ago

1.3.29

6 years ago

1.3.28-rc.1

6 years ago

1.3.28

6 years ago

1.3.27

6 years ago

1.3.26

6 years ago

1.3.25

6 years ago

1.3.23

6 years ago

1.3.22

6 years ago

1.3.21

6 years ago

1.3.20

6 years ago

1.3.18

6 years ago

1.3.17

6 years ago

1.3.16

6 years ago

1.3.15

6 years ago

1.3.14

6 years ago

1.3.13

6 years ago

1.3.12

6 years ago

1.3.11

6 years ago

1.3.10

6 years ago

1.3.9

6 years ago

1.3.8

6 years ago

1.3.7

6 years ago

1.3.6

6 years ago

1.3.5

6 years ago

1.3.4

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.1-rc1

6 years ago

1.2.0-rc1

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.46

6 years ago

1.0.45

6 years ago

1.0.44

6 years ago

1.0.43

6 years ago

1.0.42

6 years ago

1.0.39

6 years ago

1.0.38

6 years ago

1.0.37

6 years ago

1.0.36

6 years ago

1.0.35

6 years ago

1.0.34

6 years ago

1.0.33

6 years ago

1.0.32

6 years ago

1.0.31

6 years ago

1.0.30

6 years ago

1.0.29

6 years ago

1.0.28

6 years ago

1.0.27

6 years ago

1.0.26

6 years ago

1.0.25

6 years ago

1.0.24

6 years ago

1.0.23

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.13

7 years ago

1.0.9

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago