【问题标题】:Loading, please wait message doesn't hide after the data has been loaded正在加载,请稍候 数据加载后消息不会隐藏
【发布时间】:2022-02-12 02:42:22
【问题描述】:

我有这个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>

【问题讨论】:

  • 你在这里用什么?你能提供一个“db_json”数据的工作小提琴吗?
  • 可能是JQuery的问题。

标签: javascript html css bootstrap-4 bootstrap-table


【解决方案1】:

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

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

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

【讨论】:

  • 这也解决了我的问题。谢谢你:)
【解决方案2】:

对我有用的是用我自己的覆盖 Bootstrap 的 CSS。在必须在 HEAD 在 Bootstrap CSS 链接之后声明的yourname.css 文件中,包含以下内容:

.fixed-table-loading {
    visibility: hidden;
    top: 0px;
    display: none;
}

.loading-wrap {
    visibility: hidden;
    display: none;
}

.table-loading {
    visibility: hidden;
    display: none;
}

.loading {
    visibility: hidden;
    display: none;
}

这会阻止包含“Loading, please wait”的div出现。

【讨论】:

    猜你喜欢
    • 2015-01-17
    • 1970-01-01
    • 2012-05-30
    • 2010-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-21
    • 2010-11-08
    相关资源
    最近更新 更多