Bootstrap-Table 1.15.4每页的分页行数下拉菜单不起作用

问题描述 投票:1回答:2

Bootstrap-table bootstrap-table.min.js 1.15.4 Bootstrap bootstrap.min.js 4.3.1 Jquery jquery-min.js 3.4.1

页面正在加载中。但是,用于选择每页行数的下拉列表不起作用。表代码在引导表的在线编辑器上运行正常。我已经尝试过使用其他表,但它不起作用。

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
2个回答
0
投票

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

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

0
投票

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

<script src="webjars/popper.js/1.14.7/umd/popper.min.js"></script>
© www.soinside.com 2019 - 2024. All rights reserved.