• 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);
    });
  • 相关阅读:
    [zz]redhat6.0无法识别ntfs分区的解决方法
    使用ftp搭建yum源问题解决
    [zz]搭建centos6.0本地yum源(32位)
    JAVA传统线程技术
    JAVA判断字符串是否为数字
    java之异常
    随便记两笔Java中的反射
    【转】单例模式完全解析
    java.lang.Enum
    文件搜索
  • 原文地址:https://www.cnblogs.com/zzxzxn/p/10761693.html
Copyright © 2020-2023  润新知