列表页脚数据模型 FooterModel

1.说明

用于DataGrid组件生成页脚而设置的

2.参数顺序

constructor(name,type,value=null,content=null)

3.API

参数名 默认值 参数说明
name null 对应数据字段名称
type null 计算类型,sum求和,avg平均值
content func 决定如何计算统计值,传递两个参数(rowData,rowIndx)代表当前行数据,当前行标,函数返回值即为当前行的统计依据
value null 当分页时,前端是无法计算出统计值的,需要由后端自行传递,该参数有值时,type参数无效,此时需要另外一个参数footerSource,详见DataGrid

4.代码演示

let footermodel=New FooterModel("sealNum","avg",null);
<DataGrid  ref = "DataGrid"
           headers={showHeaders}
           data={this.state.exchangeList}
           pagination={false}
           selectAble={false}
           footer={footerModel}/>

results matching ""

    No results matching ""