本文实例为大家分享了bootstrap table复杂操作,如何
生成外层表格
,如何填充表格内容,
供大家参考,具体内容如下1、先生成外层表格:
},{
title: '讲义',colspan: 3,align: 'center'
},{
title: '视频',{
title: '总完成情况',align: 'center'
}
],[
{
field: 'handoutCount',title: '讲义总数',sortable: true,{
field: 'handoutComCount',title: '完成数',align: 'center'
},{
field: 'handoutCountDegree',title: '完成率',align: 'center'
},{
field: 'videoCount',title: '视频总数',{
field: 'videoComCount',{
field: 'videoCountDegree',{
field: 'allCount',title: '总数',{
field: 'allComCount',title: '总完成数',{
field: 'allDegree',title: '总完成率',align: 'center'
}
]
]
});
2、生成展开之后的表格内容:
});
}
if(key=="video"){
$.each(value,video){
var row = {};
row['videoIndex']=index+1;
row['videoName']=video.videoName;
row['degree']=video.degree;
videoData.push(row);
});
}
});
return html.join('');
}
3、填充表格内容:
function initHandoutTable(colums,data,index){
$('#tableHandout'+index).bootstrapTable('destroy').bootstrapTable({
cache: false,height: 200,columns:colums,data:data
});
}
function initVideoTable(colums,index){
$('#tableVideo'+index).bootstrapTable('destroy').bootstrapTable({
cache: false,data:data
});
}
如果大家还想深入学习,可以点击进行学习,再为大家附两个精彩的专题:
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持编程之家。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。