jquery插件
bootstrap-table:
设置中文 <script type="text/javascript" src="bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
修改传递参数
queryParams: function (params) {
return params;
},->
queryParams: function (params) {
return {
pageSize: params.pageSize,
pageNumber: params.pageNumber
};
},
修改返回数据
responseHandler: function (res) {
return res;
},->
responseHandler: function (res) {
if(res.total > 0) {
return {
"rows": res.pagList,
"total": res.total
}
} else {
return {
"rows": [],
"total": 0
}
}
},
对应实体类
private int total;
private List<T> pagList;
修改queryParamsType: 'limit',
queryParamsType: '',
修改request method
method: 'get', ->
method: 'post',
开启分页
pagination: true,