bootstrap-table遇到的问题

1.controller层

queryParams 参数提交不过去 是因为 bootstrap-table.js中默认是contentType: 'application/json',我们必须改成
contentType : "application/x-www-form-urlencoded",而且必须是post提交。/
因为bootstrap-table.js源码中是:
 
request = $.extend({}, calculateObjectValue(null, this.options.ajaxOptions), { type: this.options.method, url: url || this.options.url, data: this.options.contentType === 'application/json' && this.options.method === 'post' ? JSON.stringify(data) : data, cache: this.options.cache, contentType: this.options.contentType, dataType: this.options.dataType, 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(); }, error: function (res) { that.trigger('load-error', res.status, res); if (!silent) that.$tableLoading.hide(); } });

 

2.pageSize传不到controller

 

需要在提交时加上
 
queryParamsType : "limit", // //设置为limit则会发送符合RESTFull格式的参数

 

   更多计算机视频教程(Java、Python、大数据等等)、计算机软件(Mac)、影视资源推荐。

         欢迎大家关注本公众号:V的聚集地 

 

 

 
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值