striped: true, //是否显示行间隔色
$table.bootstrapTable({
url: '',
method: 'GET',
locale: "zh-CN",
toolbar: "#toolbar",
striped: true,
//是否显示行间隔色
cache: false,
showRefresh: true,
showToggle: true,
showTullscreen: true,
showColumns: true,
showColumnsToggleAll: true,
detailView: true,
showExport: true,
showPrint: true,
showCopyRows: true,
minimumCountColumns: '2',
showPaginationSwitch: true,
pagination: true,
uniqueId: 'ID',
pageNumber: 1,
pageSize: 10,
pageList: [10, 25, 50],
sidePagination: 'server',
queryParams: function(params) {
var data = {
rows: params.limit,
};
return data;
},
onLoadSuccess: function(data) {
console.log(data);
},
onLoadError: function() {
console.log("数据加载失败!");
},
});
简单粗暴点,直接在这个table上面把这个行间隔色的class写上去,例如
<table id="table" class="table-striped"></table>
bootstrap-table-fixed-columns.css
这个css引用了吗