关于表格分页参数设置的问题

提问 已结 5 7475
悬赏:80飞吻
1.我看到表格分页是否是默认支持前台分页的,也就是说自带分页功能,但是我看到分页参数配置有pagination并没有在案例用用到。
2.我需要使用表格的后台分页,配置pagination 的时候,后台想拿到pageNumber和pageSize以及自定义的数目,如何能拿到,目前看有些没拿到。
3.后台json可以自定义吗,比如得使用 总数key为total,数据key为rows的json结构吗?

分页
<!-- datagrid表格 -->
<table data-toggle="topjui-datagrid"
data-options="id:'id',
url:'${basePath}/syUser/findUserList',
pagination:true,
filter: [{
field: 'userName',
type: 'textbox',
op: ['contains', 'equal', 'notequal', 'less', 'greater']
},{
field: 'sex',
type: 'combobox',
options: {
valueField: 'value',
textField: 'label',
data: [{
label: '男',
value: '1'
}, {
label: '女',
value: '2'
}]
},
op: ['contains', 'equal', 'notequal', 'less', 'greater']
},{
field: 'post',
type: 'combobox',
options: {
valueField: 'value',
textField: 'label',
multiple: true,
data: [{
label: 'CEO',
value: 'CEO'
}, {
label: 'COO',
value: 'COO'
}, {
label: 'CTO',
value: 'CTO'
}]
},
op: ['contains', 'equal', 'notequal', 'less', 'greater']
}]">
<thead>
<tr>
<th data-options="field:'uuid',title:'UUID',checkbox:true"></th>
<th data-options="field:'userNameId',title:'员工号',sortable:true"></th>
<th data-options="field:'userName',title:'姓名',sortable:true"></th>
<th data-options="field:'sex',title:'性别',sortable:true,
formatter:function(value,row,index){
if (value == '1') {
return '男';
} else if (value == '2') {
return '女';
} else {
return '';
}
}"></th>
<th data-options="field:'telephone',title:'电话',sortable:true"></th>
<th data-options="field:'email',title:'电子邮箱',sortable:true"></th>
<th data-options="field:'mobile',title:'手机',sortable:true"></th>
<th data-options="field:'orgName',title:'所属机构',sortable:true"></th>
<th data-options="field:'post',title:'职务',sortable:true"></th>
<th data-options="field:'userGroup',title:'用户组',sortable:true"></th>
<th data-options="field:'zone',title:'所属区域',sortable:true,hidden:true,formatter:function(value,row,index){return row.country+' '+row.province+' '+row.city+' '+row.district}"></th>
</tr>
</thead>
</table>
回帖
回帖须知