
如圖我沒有給樣式 不曉得怎么回事變成了藍色
<table id="userTable" class="table table-striped table-bordered table-hover"></table>
這是代碼塊
$("#userTable").bootstrapTable({
url: '/SelectUserAll',//請求后臺的URL(*)
method: 'post',//請求方式(*)
toolbar: '#toolbar',//工具按鈕用哪個容器
striped: true,//是否顯示行間隔色
cache: false,//是否使用快取,默認為true,所以一般情況下需要設定一下這個屬性(*)
pagination: true,//是否顯示分頁(*)
sortable: false,//是否啟用排序
sortOrder: "asc",//排序方式
// queryParams: oTableInit.queryParams,//傳遞引數(*)
sidePagination: "client",//分頁方式:client客戶端分頁,server服務端分頁(*)
pageNumber: 1,//初始化加載第一頁,默認第一頁
pageSize: 10,//每頁的記錄行數(*)
pageList: [5, 15, 25, 50],//可供選擇的每頁的行數(*)
// search: true,//是否顯示表格搜索,此搜索是客戶端搜索,不會進服務端,所以,個人感覺意義不大
contentType: "application/x-www-form-urlencoded",
strictSearch: true,
showColumns: true,//是否顯示所有的列
showRefresh: true,//是否顯示重繪按鈕
minimumCountColumns: 2,//最少允許的列數
clickToSelect: true,//是否啟用點擊選中行
height: 700,//行高,如果沒有設定height屬性,表格自動根據記錄條數覺得表格高度
uniqueId: "id",//每一行的唯一標識,一般為主鍵列
showToggle: true,//是否顯示詳細視圖和串列視圖的切換按鈕
cardView: false,//是否顯示詳細視圖
detailView: false,//是否顯示父子表
columns: [{
checkbox: true, //在所有列之前顯示一個checkbox
showToolbar: true,
}, {
field: 'id',
title: 'id',
align: 'center',
}, {
field: 'username',
title: '用戶名',
align: 'center',
}, {
field: 'sex',
title: '性別',
align: 'center',
formatter : function(value,rec,index)
{ return value == 1 ? "男" : value == 0 ? "女": "";}
}, {
field: 'email',
title: '郵箱',
align: 'center'
}, {
field: "address",
title: "地址",
align: 'center'
}, {
field: "occupation",
title: "職業",
align: 'center'
}, {
field: "telephone",
title: "電話",
align: 'center'
},{
field: "Button",
title: "操作",
align: 'center',
events: operateEvents,//給按鈕注冊事件
formatter: AddUserFunctionAlty//表格中增加按鈕
}]
});
麻煩各位大佬幫忙瞧瞧
uj5u.com熱心網友回復:
有沒有大佬瞧瞧啊轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/225247.html
標籤:Ajax
上一篇:vue表格不管資料欄位多少都是一行一個陣列,怎樣一組陣列結束橫著排列
下一篇:結構偽類選擇器問題
