开始的时候先把table隐藏了,由于判断条件让它显示,结果出现错位的问题。
前台代码:
后台代码:
if (resp.data.gch_faultanalysis.length!=0) {
console.log("gch_faultanalysis不为空!");
element.find("#faultanalysis-head").css("display","block");
element.find("#faultanalysis-table").css("display","");
element.find("#faultanalysis-table").bootstrapTable({
columns:resp.data.faultanalysisVar,pagination:"true",//sidePagination:"client",search:"true",clickToSelect: true,data: resp.data.gch_faultanalysis,singleSelect:"true",showColumns:"false",showRefresh:"true",showToggle:"true",maintainSelected:"true",//height:"413"
});
}