fastadmin 列表隐藏 快速搜索 浏览模式、显示隐藏列、导出、通用搜索

第一种:在html中

    <div class="col-xs-12 col-sm-6 col-md-5 col-lg-4">
        <div class="panel panel-default panel-intro">
            <div class="panel-body">
                <div id="myTabContent1" class="tab-content">
                    <div class="tab-pane fade active in" id="one">
                        <div class="widget-body no-padding">
                            <div id="toolbar1" class="toolbar">
                                {:build_toolbar('refresh')}
                            </div>
                            <table id="table1" class="table table-striped table-bordered table-hover" width="100%"
                                   data-search="false"         data-show-toggle="false"
                                   data-show-columns="false"         data-show-export="false"
                                   data-common-search="false"
                            >

                            </table>


                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>

```![在这里插入图片描述](https://img-blog.csdnimg.cn/470ebb23e5864e12a20c723b379f78ad.png)


## 第二种 js文件中
![在这里插入图片描述](https://img-blog.csdnimg.cn/90b7dafd4c9444a29f5609f59d8c78f1.png)
```js
            first: function () {
                // 表格1
                var table1 = $("#table1");
                table1.bootstrapTable({
                    url: 'category/index',
                    sortName: 'id',
                    search: false,
                    commonSearch: false,
                    visible: false,
                    showToggle: false,
                    showColumns: false,
                    showExport: false,
                    columns: [
                        [
                            // {field: 'state', checkbox: true,},
                            {field: 'id', title: 'ID',operate:false},
                            {field: 'name', title: __('Category.name'),operate:false},
                            {
                                field: 'operate', title: __('Operate'), table: table1, events: Table.api.events.operate, buttons: [
                                    {
                                        name: 'log',
                                        title: '日志列表',
                                        text: '日志列表',
                                        icon: 'fa fa-list',
                                        classname: 'btn btn-primary btn-xs btn-click',
                                        click: function (e, data) {
                                            // $("#myTabContent2 .form-commonsearch input[name='username']").val(data.username);
                                            $("#myTabContent2 .btn-refresh").trigger("click");
                                        }
                                    }
                                ], formatter: Table.api.formatter.operate
                            }
                        ]
                    ]
                });

                // 为表格1绑定事件
                Table.api.bindevent(table1);
            },
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值