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


參考鏈接: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 }

 

 

待續......


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM