bootstrap table服务端分页渲染不到数据,报错信息:Cannot read property 'classes' of undefined at BootstrapTable.initB

报错信息如图:

bootstrap table服务端分页渲染不到数据,报错信息:Cannot read property 'classes' of undefined at BootstrapTable.initB    

 

    原因:rowStyle方法必须返回一种样式类型
    解决方案:
        rowStyle: function(row, index) {
            //这里有5个取值代表5中颜色['active', 'success', 'info', 'warning', 'danger'];
            var strclass = "success";
            return {
                classes: strclass
            }
        }

参考链接:https://blog.csdn.net/jing12062011/article/details/78518343