首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >VM1059 bootstrap-table.min.js:7 Uncaught TypeError: Cannot read property 'classes' of undefined

VM1059 bootstrap-table.min.js:7 Uncaught TypeError: Cannot read property 'classes' of undefined

作者头像
别先生
发布2019-07-15 14:53:33
8120
发布2019-07-15 14:53:33
举报
文章被收录于专栏:别先生别先生

参考链接:https://blog.csdn.net/liuqianspq/article/details/81868283

1、阳光明媚的下午,我在写CRUD,让数据传到前端的时候,解析的时候报错了,报错了,报错了,仔细排查一翻,没发现问题啊,百度一下吧,然后找到这个博客,就解决了,记录一下。

 1 VM1059 bootstrap-table.min.js:7 Uncaught TypeError: Cannot read property 'classes' of undefined
 2     at o.initBody (VM926 bootstrap-table.min.js:7)
 3     at o.BootstrapTable.initBody (VM928 bootstrap-table-editable.js:58)
 4     at o.load (VM926 bootstrap-table.min.js:8)
 5     at Object.success (VM926 bootstrap-table.min.js:7)
 6     at Object.success (AicSystemLogManagement.jsp:252)
 7     at j (VM910 jquery-1.11.3.min.js:2)
 8     at Object.fireWith [as resolveWith] (VM910 jquery-1.11.3.min.js:2)
 9     at x (VM910 jquery-1.11.3.min.js:5)
10     at XMLHttpRequest.b (VM910 jquery-1.11.3.min.js:5)

Ajax请求:

 1 function dataAicSystemLogManagementRequest(params) {
 2     var pageSize = params.data.limit;
 3     var pageNum = params.data.offset / pageSize + 1;
 4     index = params.data.offset + 1;
 5     //console.log($('#dataAicSystemLogManagement').serialize());
 6     dataStr = $('#aicSystemLogManagementFrom').serialize() + '&pageNum='
 7             + pageNum + '&pageSize=' + pageSize;
 8     var url = 'logManagementAction!findPage.action';
 9     $.ajax({
10         type : 'post',
11         url : url,
12         data : dataStr,
13         dataType : 'json',
14         cache : false,
15         async : true,
16         error : function(request, textStatus, errorThrown) {
17             fxShowAjaxError(request, textStatus, errorThrown);
18         },
19         success : function(data) {
20             var applies = [];
21             if (data && data.result) {
22                 applies = data.result.items ? data.result.items : [];
23                 count = data.result.count;
24             }
25             params.success({
26                 total : count,
27                 rows : applies
28             });
29             params.complete();
30         }
31     });
32 }    

解决方法:

 1 function rowStyles(row, index) {
 2     var isException = row.isException;
 3     if (isException == "是") {
 4         return {
 5             css : {
 6                 "background-color" : "orange"
 7             }
 8         };
 9     }else{
10         return {
11             
12         };
13     }
14 }

待续......

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2019-07-12 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档