jeecg bootstrap-table表格右边工具列表不显示隐藏的列
思路:限制含有hidden = "true"的标签
例如:<t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
解决方法:修改bootstrap-table源码
找到jeecg中bootstrap-table源码 : webapp/plug-in/bootstrap-table/bootstrap-table.js
大概981行
if (column.switchable) { //表示是否可见 if(column.cardVisible){ //添加这句判断即可 html.push(sprintf('<li>' + '<label><input type="checkbox" data-field="%s" value="%s"%s> %s</label>' + '</li>', column.field, i, checked, column.title)); switchableCount++; } }
修改前:
修改后: