1.3.51-rc.10 • Published 5 years ago

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

Weekly downloads
15
License
ISC
Repository
-
Last release
5 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

5 years ago

1.3.51-rc.9

5 years ago

1.3.51-rc.7

5 years ago

1.3.51-rc.6

5 years ago

1.3.51-rc.5

5 years ago

1.3.51-rc.3

5 years ago

1.3.51-rc.2

5 years ago

1.3.51-rc.1

5 years ago

1.3.50-rc.6

5 years ago

1.3.50-rc.5

5 years ago

1.3.50-rc.4

5 years ago

1.3.50-rc.3

5 years ago

1.3.50-rc.2

5 years ago

1.3.50-rc.1

5 years ago

1.3.50

5 years ago

1.3.49

5 years ago

1.3.48

5 years ago

1.3.46

5 years ago

1.3.45

5 years ago

1.3.44

5 years ago

1.3.43

5 years ago

1.3.42

5 years ago

1.3.41

5 years ago

1.3.40

5 years ago

1.3.39

5 years ago

1.3.38

5 years ago

1.3.37

5 years ago

1.3.36

5 years ago

1.3.35-rc1

5 years ago

1.3.34-rc.11

5 years ago

1.3.34-rc.10

5 years ago

1.3.34-rc.9

5 years ago

1.3.34-rc.7

5 years ago

1.3.34-rc.6

5 years ago

1.3.34-rc.5

5 years ago

1.3.34-rc.4

5 years ago

1.3.34-rc.3

5 years ago

1.3.34-rc.2

5 years ago

1.3.34-rc.1

5 years ago

1.3.34

5 years ago

1.3.33

5 years ago

1.3.32

5 years ago

1.3.31

5 years ago

1.3.30

5 years ago

1.3.29

5 years ago

1.3.28-rc.1

5 years ago

1.3.28

5 years ago

1.3.27

5 years ago

1.3.26

5 years ago

1.3.25

5 years ago

1.3.23

5 years ago

1.3.22

5 years ago

1.3.21

5 years ago

1.3.20

5 years ago

1.3.18

5 years ago

1.3.17

5 years ago

1.3.16

5 years ago

1.3.15

5 years ago

1.3.14

5 years ago

1.3.13

5 years ago

1.3.12

5 years ago

1.3.11

5 years ago

1.3.10

5 years ago

1.3.9

5 years ago

1.3.8

5 years ago

1.3.7

5 years ago

1.3.6

5 years ago

1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1-rc1

5 years ago

1.2.0-rc1

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.46

5 years ago

1.0.45

5 years ago

1.0.44

5 years ago

1.0.43

5 years ago

1.0.42

5 years ago

1.0.39

5 years ago

1.0.38

5 years ago

1.0.37

5 years ago

1.0.36

5 years ago

1.0.35

5 years ago

1.0.34

5 years ago

1.0.33

5 years ago

1.0.32

5 years ago

1.0.31

5 years ago

1.0.30

5 years ago

1.0.29

5 years ago

1.0.28

5 years ago

1.0.27

5 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.13

5 years ago

1.0.9

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago