bootstrapTable 隱藏某一列


關鍵內容:
visible: false   //這一列隱藏





<script th:inline="javascript">
var datas = [[${@dict.getType('sys_normal_disable')}]];
var prefix = ctx + "system/role/authUser";

$(function() {
var options = {
url: prefix + "/unallocatedList",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
importUrl: prefix + "/importData",
importTemplateUrl: prefix + "/importTemplate",
queryParams: queryParams,
sortName: "createTime",
sortOrder: "desc",
modalName: "用戶",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
clickToSelect: true,
rememberSelected: true,
        
         method: 'get', //默認是post,不允許對靜態文件訪問
                cache: false,
                striped: true, // 隔行加亮
                pagination: true, // 開啟分頁功能
                pageSize: 20, // 設置默認分頁為 20
                pageNumber: 1,
                pageList: [10, 25, 50, 100, 200], // 自定義分頁列表
                //contentType: "application/x-www-form-urlencoded",//如果想用request.form 方式,設置  contentType: "application/x-www-form-urlencoded",
                search: false,//開啟搜索功能
                sidePagination: 'server',//設置為服務器端分頁
                queryParams: queryParams,//參數
                showColumns: true, // 開啟自定義列顯示功能
                showRefresh: false, // 開啟刷新功能
                minimumCountColumns: 2,// 設置最少顯示列個數
                clickToSelect: true,
                smartDisplay: true,
                clickToSelect: true, // 單擊行即可以選中
                sortName: 'OrderRealItemsId', // 設置默認排序為 name
                sortOrder: 'desc', // 設置排序為反序 desc
                smartDisplay: true, // 智能顯示 pagination 和 cardview 等
                dataType: "json",

columns: [{
checkbox: true
},
{
field: 'userId',
title: '編號',
visible: false //這一列隱藏
},
{
field: 'userName',
title: '姓名',
sortable: true
},

{
field: 'phonenumber',
title: '手機'
},

{
field: 'createTime',
title: '創建時間',
sortable: true
}]
};
$.table.init(options);
});


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM