【问题标题】:Bootstrap-Table 1.15.4 pagination number of rows per page drop-down is not workingBootstrap-Table 1.15.4 分页每页行数下拉菜单不起作用
【发布时间】:2019-10-07 07:09:54
【问题描述】:

引导表 bootstrap-table.min.js 1.15.4 引导引导 bootstrap.min.js 4.3.1 Jquery jquery-min.js 3.4.1

页面加载正常。但是,选择每页行数的下拉列表不起作用。表代码在 bootstrap-table 的在线编辑器上运行良好。我已经尝试过使用不同的表,但它不起作用。

https://jsfiddle.net/ashishvermapu/f54jweyc/1/

<table class="table table-striped" data-pagination="true" data-toggle="table" data-search="true">
<script src="webjars/jquery/3.4.1/jquery.min.js"></script>
<script src="webjars/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<script src="webjars/bootstrap-table/1.15.4/dist/bootstrap-table.min.js"></script>

【问题讨论】:

    标签: jquery html pagination bootstrap-table


    【解决方案1】:

    Bootstrap 4 依赖于 popper.js。我导入了以下 js 来解决问题。

    <script src="webjars/popper.js/1.14.7/umd/popper.min.js"></script>
    

    【讨论】:

    【解决方案2】:

    您只需要通过 jquery 初始化数据表...给表一个 id(我使用 userDataTable)并使用此代码

    $(document).ready(function() {
        $('#userDataTable').DataTable();
    } );
    

    【讨论】:

    • 我使用的是引导表而不是数据表
    猜你喜欢
    • 2016-01-02
    • 2013-01-21
    • 2018-08-08
    • 2012-03-20
    • 2019-05-06
    • 2021-12-19
    • 2020-07-13
    • 2018-02-12
    • 1970-01-01
    相关资源
    最近更新 更多