首页 > 解决方案 > 正在加载,请稍候 数据加载后消息不会隐藏

问题描述

我有这个 bootstrap-table 数据表,加载完所有数据后,消息继续显示。任何人都知道为什么会这样?先感谢您。

<table class='table table-striped table-hover' id='main_table' data-url={{ db_json }} data-click-to-select='true' data-filter-control="true" clickToSelect='true'>
    <thead>
        <tr>
          <th data-checkbox="true" data-checkbox-enabled="true"></th>
          <th data-field="ID" data-visible="false">Id</th>
          <th data-field="data1" data-filter-control="input">data1</th>
          <th data-field="data2" data-filter-control="select">data2</th>
          <th data-field="data3" data-filter-control="select">data3</th>

        </tr>
    </thead>
</table>

在此处输入图像描述

标签: javascripthtmlcssbootstrap-4bootstrap-table

解决方案


我遇到了同样的问题,我找到的解决方案是在 html 文件的头部包含 bootstraptable 中的 css 文件。

<head>
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.2/dist/bootstrap-table.min.css">
</head>

此外,如果您正在使用本地文件,请不要忘记引用该bootstrap-table.min.css文件。


推荐阅读