久久r热视频,国产午夜精品一区二区三区视频,亚洲精品自拍偷拍,欧美日韩精品二区

您的位置:首頁技術文章
文章詳情頁

javascript - bootstrap-table 接收后臺數據報錯, ’total’ undefined

瀏覽:138日期:2023-11-30 17:06:46

問題描述

bootstrap-table ajax請求,接收后臺json數據報錯,Cannot read property ’total’ of undefined。javascript - bootstrap-table 接收后臺數據報錯, ’total’ undefined后臺返回結果格式和網上的一樣:{'total':10, 'rows': [{'password':'123','last_login_time':1492866743000,'create_time':1466046933000,'user_id':1,'user_name':'admin'},{'password':'22','last_login_time':1492538400000,'create_time':1492019996000,'user_id':4,'user_name':'下次'},{'password':'111','last_login_time':1491501637000,'create_time':1491501637000,'user_id':10,'user_name':'小王'}]}求大神們幫忙看看

javascript - bootstrap-table 接收后臺數據報錯, ’total’ undefined我把bootstrap-table.js里的這一行注釋了,就跑通了,但是不顯示翻頁圖標,只有下圖的結果。。。。javascript - bootstrap-table 接收后臺數據報錯, ’total’ undefined

問題解答

回答1:

好蛋疼啊,responseHandler : function(res) { }里收到了參數,里面rows數組和taotal的值,但是沒進入onLoadSuccess : function(data){}.

回答2:

同求啊,為什么呢,也是這個問題,打完斷點,發現最后到了res = calculateObjectValue(...)這步的時候出了問題,導致load傳進的參數是undefined,已經糾結很久了、、、

success: function (res) {res = calculateObjectValue(that.options, that.options.responseHandler, [res], res);that.load(res);that.trigger(’load-success’, res);if (!silent) that.$tableLoading.hide(); },

標簽: JavaScript
主站蜘蛛池模板: 津南区| 西和县| 玉田县| 新河县| 玉山县| 宁夏| 治县。| 江陵县| 安徽省| 万年县| 陈巴尔虎旗| 清苑县| 正安县| 象山县| 新闻| 高州市| 富川| 贵溪市| 岗巴县| 建阳市| 千阳县| 天镇县| 邓州市| 墨脱县| 秀山| 辽源市| 金堂县| 格尔木市| 沭阳县| 富顺县| 江达县| 喀什市| 察哈| 山丹县| 邢台市| 临夏县| 雅安市| 吉安县| 太仓市| 渭南市| 东阳市|