修改 bootstrap table 默认detailRow样式的实例代码

废话不多说了,直接给大家贴代码,具体代码如下所示:

tr[data-index] > td > .detail-icon').off('click').on('click',function () { var $this = $(this),//a.detail-icon $tr = $this.parent().parent(),//current row index = $tr.data('index'),row = data[index]; // Fix #980 Detail view,when searching,returns wrong row // remove and update if ($tr.next().is('tr.detail-view')) { //exsit $this.find('i').attr('class',sprintf('%s %s',that.options.iconsprefix,that.options.icons.detailOpen)); that.trigger('collapse-row',index,row); $tr.next().remove(); $tr.next().remove(); } else { //not exsit and add $this.find('i').attr('class',that.options.icons.detailClose)); //$tr.after(sprintf('%s">culateObjectValue(that.options,that.options.detailFormatter,[index,row,$element1,$element2],''); //console.log(content); //head,body Object if($element1.length === 1) { $element1.append(content.head); $element2.append(content.body); } that.trigger('expand-row',$element2); } that.resetView(); return false; });

以上所述是小编给大家介绍的修改 bootstrap table 认detailRow样式的实例代码。编程之家 jb51.cc 收集整理的教程希望能对你有所帮助,如果觉得编程之家不错,可分享给好友!感谢支持

相关文章

Bootstrip HTML 查询搜索常用格式模版 <form class=&...
如何在按钮上加红色数字 您可以使用Bootstrap的badge组件来在...
要让两个按钮左右排列,你可以使用 Bootstrap 的网格系统将它...
是的,可以将status设置为布尔类型,这样可以在前端使用复选...
前端工程师一般用的是Bootstrap的框架而不是样式,样式一般自...
起步导入:<linkrel="stylesheet"href="b...