Bootstrap-Table 1.15.4 分页每页行数下拉不工作
Bootstrap-Table 1.15.4 pagination number of rows per page drop-down is not working
Bootstrap-Tablebootstrap-table.min.js1.15.4Bootstrapbootstrap.min.js4.3.1Jqueryjquery-min.js3.4.1
页面加载正常。但是,select 每页行数的下拉列表不起作用。 Table 代码在 bootstrap-table 的在线编辑器上运行良好。我已经尝试使用不同的 tables 但它不起作用。
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 初始化数据table...给 table 一个 ID(我使用了 userDataTable)并使用此代码
$(document).ready(function() {
$('#userDataTable').DataTable();
} );
Bootstrap 4 依赖于 popper.js。我导入了以下js来解决问题。
<script src="webjars/popper.js/1.14.7/umd/popper.min.js"></script>
Bootstrap-Tablebootstrap-table.min.js1.15.4Bootstrapbootstrap.min.js4.3.1Jqueryjquery-min.js3.4.1
页面加载正常。但是,select 每页行数的下拉列表不起作用。 Table 代码在 bootstrap-table 的在线编辑器上运行良好。我已经尝试使用不同的 tables 但它不起作用。
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 初始化数据table...给 table 一个 ID(我使用了 userDataTable)并使用此代码
$(document).ready(function() {
$('#userDataTable').DataTable();
} );
Bootstrap 4 依赖于 popper.js。我导入了以下js来解决问题。
<script src="webjars/popper.js/1.14.7/umd/popper.min.js"></script>