<style>
.userLtbTbodyHeight {
height: 128px!important;
}
</style>
<script>
$(this).on('load-success.bs.table', function() {
if ($('.userListTableId tr').length == 2) {
$("#userTreeListBstable tbody").addClass("userLtbTbodyHeight")
} else {
$("#userTreeListBstable tbody").removeClass("userLtbTbodyHeight")
}
})
</script>
补充:
bookstrap 中文网
https://www.bootstrap-table.com.cn/doc/api/events/#onloadsuccess