­

Bootstrap Table含有按钮时表格不对齐

  • 2019 年 10 月 6 日
  • 筆記

使用Bootstrap Table的时候,在含有按钮的情况,有时候表格的线垂直方向上不对齐

解决方法:

(1)调整表格的高度小些或者大些(至于为什么,并不清楚,调整高度后就对齐了)

(2)加setTimeout

        $('#tableTest1').bootstrapTable({              // method: "POST",              // contentType: "application/x-www-form-urlencoded",              // url: "goSkidSetting1",              height: $(window).height() - 150,              pageNumber: 1,                       //初始化加载第一页,默认第一页              pageSize: 10,                       //每页的记录行数(*)              showColumns: false,                  //是否显示所有的列              showRefresh: false,                  //是否显示刷新按钮              search: true,              pagination: true,              pageList: [10],              // sidePagination: 'server',              // queryParamsType: "",              // queryParams: queryParams,          });  		setTimeout(function(){  	       $('#tableTest1').bootstrapTable('resetView');  		},50)