引入js
<th:block th:include="include :: bootstrap-table-fixed-columns-js"/>
设置参数
var options = {
url: url,
exportUrl: exportUrl,
modalName: "测试",
fixedColumns: true,//打开冻结按钮
fixedNumber: 1,//固定左侧,固定左侧几列填几
fixedRightNumber: 1,//固定右侧,固定右侧几列填几
showFooter: true,
columns: [{
checkbox: true
},
{
field: 'id',
title: '编号',
class: 'nowarp'
},
{
field: 'name',
title: '姓名',
class: 'nowarp'
},
{
field: 'sex',
title: '性别',
class: 'nowarp'
}]
};