81,092
社区成员
发帖
与我相关
我的任务
分享
<div class="container col-md-11">
<table class="table table-striped" id="raDeviceList" align="center"
striped="true" data-click-to-select="true"
data-toolbar="#ratoolbar"<%--设置装按钮的容器为id为toolbar--%>
data-pagination="true"<%--设置是否显示页码数--%>
data-show-refresh="true" <%--设置刷新按钮--%>
data-showColumns="true">
</table>
</div>
$('#raDeviceList').bootstrapTable({
//是否显示行间隔色
striped: true,
//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*)
cache: false,
//是否显示分页(*)
pagination: true,
//是否启用排序
sortable: false,
//排序方式
sortOrder: "asc",
//每页的记录行数(*)
pageSize: 8,
//可供选择的每页的行数(*)
pageList: [10, 25, 50, 100],
//是否显示搜索
search: true,
//是否显示列头
showHeader: true,
// 显示下拉框勾选要显示的列
showColumns : true,
//data:json,
//这个接口需要处理bootstrap table传递的固定参数,并返回特定格式的json数据
url: "/realAlarm/selectRealAlarmInfo",
contentType: "application/x-www-form-urlencoded",//必须要有!!!!
method: 'post', //请求方式(*)
dataType: "json",
//默认值为 'limit',传给服务端的参数为:limit, offset, search, sort, order Else
//queryParamsType:'',
////查询参数,每次调用是会带上这个参数,可自定义
/*queryParamsType: 'limit',//查询参数组织方式
queryParams: roleQueryParams,*/
//分页方式:client客户端分页,server服务端分页(*)
sidePagination: "client",
locale: 'zh-CN',//中文支持
/* toolbar: '#toolbar',//指定工作栏*/
columns: raTableColumns,
});