国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

javascript - bootstrap-table 接收后臺(tái)數(shù)據(jù)報(bào)錯(cuò), ’total’ undefined

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

問(wèn)題描述

bootstrap-table ajax請(qǐng)求,接收后臺(tái)json數(shù)據(jù)報(bào)錯(cuò),Cannot read property ’total’ of undefined。javascript - bootstrap-table 接收后臺(tái)數(shù)據(jù)報(bào)錯(cuò), ’total’ undefined后臺(tái)返回結(jié)果格式和網(wǎng)上的一樣:{'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 接收后臺(tái)數(shù)據(jù)報(bào)錯(cuò), ’total’ undefined我把bootstrap-table.js里的這一行注釋了,就跑通了,但是不顯示翻頁(yè)圖標(biāo),只有下圖的結(jié)果。。。。javascript - bootstrap-table 接收后臺(tái)數(shù)據(jù)報(bào)錯(cuò), ’total’ undefined

問(wèn)題解答

回答1:

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

回答2:

同求啊,為什么呢,也是這個(gè)問(wèn)題,打完斷點(diǎn),發(fā)現(xiàn)最后到了res = calculateObjectValue(...)這步的時(shí)候出了問(wèn)題,導(dǎo)致load傳進(jìn)的參數(shù)是undefined,已經(jīng)糾結(jié)很久了、、、

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(); },

標(biāo)簽: JavaScript
主站蜘蛛池模板: 顺昌县| 荆州市| 宁陕县| 汨罗市| 阿坝县| 留坝县| 合肥市| 绥滨县| 福泉市| 社旗县| 祥云县| 葵青区| 巨鹿县| 桃江县| 林周县| 夏邑县| 武穴市| 上蔡县| 惠水县| 永济市| 河曲县| 资中县| 永丰县| 拜城县| 白水县| 修水县| 景东| 祁阳县| 岳池县| 岚皋县| 桐柏县| 万山特区| 乌兰察布市| 河间市| 如东县| 海阳市| 达尔| 林芝县| 民勤县| 道真| 萨嘎县|