bootstrap-table Fixed Columns冻结列、固定列

bootstrap-table Fixed Columns冻结列、固定列

使用的插件

1.引用css文件,js文件(注意引用顺序)

    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/bootstrap-table.css">
    <link rel="stylesheet" href="css/bootstrap-table-fixed-columns.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/bootstrap-table.js"></script>
    <script src="js/bootstrap-table-fixed-columns.js"></script>

引用

2.添加 是否启用固定列: fixedColumns: true 固定列的个数:fixedNumber: 3

$table.bootstrapTable({
                dataType: "json",
                method: 'get',
                contentType: "application/x-www-form-urlencoded",
                cache: false,
                url: '',
                pagination: true,
                fixedColumns: true,   //*
                fixedNumber: 3,       //*
                columns: []
            })

猜你喜欢

转载自blog.csdn.net/weixin_42575028/article/details/86621234
今日推荐