var $table = $('#table')
 
  $(function() {
    $('#checkAll').click(function () {
      $table.bootstrapTable('togglePagination').bootstrapTable('checkAll').bootstrapTable('togglePagination')
    })
 
    $('#uncheckAll').click(function () {
      $table.bootstrapTable('togglePagination').bootstrapTable('uncheckAll').bootstrapTable('togglePagination')
    })
  })

参考:

https://examples.bootstrap-table.com/#issues/1167.html

https://examples.bootstrap-table.com/#issues/1167.html#view-source