常常因为表格字段比较长,须要默认隐藏不是特别重要的列,只须要2步便可完成bootstrap
一、首先在thead里设置data-field 属性 ide
<thead>
<th data-sortable="true" data-field="dataTypeId">客户名称table<th data-sortable="true" data-field="datayibiao">客户名称方法
</thead>sort
二、调用hideColumn方法tab
$('#tableTest3').bootstrapTable('hideColumn',"dataTypeId"); //tableTest3为table的ID
$('#tableTest3').bootstrapTable('hideColumn',"datayibiao") ;block