bootstrap table url 参数设置为空 怎么还在加载

bootstrap table url 参数设置为空 怎么还在加载


回首忆惘然
浏览 1679回答 1
1回答

慕的地6264312

bootstrap-table的一些配置参数[html] view plain copy$('#reportTable').bootstrapTable({method: 'post',url: '/qStock/AjaxPage',dataType: "json",striped: true, //使表格带有条纹pagination: true, //在表格底部显示分页工具栏pageSize: 22,pageNumber: 1,pageList: [10, 20, 50, 100, 200, 500],idField: "ProductId", //标识哪个字段为id主键showToggle: false, //名片格式cardView: false,//设置为True时显示名片(card)布局showColumns: true, //显示隐藏列showRefresh: true, //显示刷新按钮singleSelect: true,//复选框只能选择一条记录search: false,//是否显示右上角的搜索框clickToSelect: true,//点击行即可选中单选/复选框sidePagination: "server",//表格分页的位置queryParams: queryParams, //参数queryParamsType: "limit", //参数格式,发送标准的RESTFul类型的参数请求toolbar: "#toolbar", //设置工具栏的Id或者classcolumns: column, //列silent: true, //刷新事件必须设置formatLoadingMessage: function () {return "请稍等,正在加载中...";},formatNoMatches: function () { //没有匹配的结果return '无符合条件的记录';},onLoadError: function (data) {$('#reportTable').bootstrapTable('removeAll');},onClickRow: function (row) {window.location.href = "/qStock/qProInfo/" + row.ProductId;},});bootstrap-table带参到后台去的代码[html] view plain copyfunction queryParams(params) { //配置参数var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的pageSize: params.limit, //页面大小pageNumber: params.pageNumber, //页码minSize: $("#leftLabel").val(),maxSize: $("#rightLabel").val(),minPrice: $("#priceleftLabel").val(),maxPrice: $("#pricerightLabel").val(),Cut: Cut,Color: Color,Clarity: Clarity,sort: params.sort, //排序列名sortOrder: params.order//排位命令(desc,asc)};return temp;} 
打开App,查看更多内容
随时随地看视频慕课网APP