bootstrapTable 提供了比较丰富的表格插件和默认排序功能,但是对行数据的操作需要通过以下函数来实现:
rowAttributes 对每行的数据进行数据扩展,
rowStyle:对每行的样式进行自定义,classes, css:
rowAttributes:function rowAttributes(row, index) {
return {
'data-id':row.guid,
'data-htmlpath':row.htmlPath,
'data-xmlpath':row.xmlPath
}
},
rowStyle: function rowStyle(value, row, index) {
return {
classes: 'trdata' ,
css:{height:100px,left:200px;}
};
},
本文介绍了如何使用 BootstrapTable 的 rowAttributes 和 rowStyle 函数来自定义表格行的属性和样式。通过对每行数据进行扩展及样式定制,可以增强表格的表现力。
1154

被折叠的 条评论
为什么被折叠?



