- 数据缓存配置
设置cache,这样就不会每次带上_=时间这个参数,可以自行设置返回头,从而实现缓存
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'pid',
sortOrder: 'asc',
search:false,
commonSearch:false,
showExport:false,
showToggle:false,
showColumns:false,
cache: true,
-
列宽
列参数里面直接写width=“30%”,但是有个前提,formatter不能是Content,也不用用class=“autocontent”,否则就会适配到自动内容的样式 -
列换行,直接写style里面white-space:pre-wrap