正在加载,请稍候消息在数据加载后不会隐藏

Rof*_*los 3 html javascript css bootstrap-table bootstrap-4

我有这个 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>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

Csh*_*rls 9

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

<head>
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.18.2/dist/bootstrap-table.min.css">
</head>
Run Code Online (Sandbox Code Playgroud)

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