从不支持 BT5 的远程 URL 加载数据
Load data from a remote URL not working with BT5
我正在尝试通过设置 data-url=""
从远程 URL 加载数据。 Bootstrap v4 一切正常,但是当我使用最新版本的 Bootstrap (v5.0.1) 时,数据未加载。
我尝试了不同的选项:仅 Bootstrap 与 Popper 捆绑,jQuery + Bootstrap 与 Popper 捆绑或单独的脚本解决方案,但似乎没有任何效果。
<table
id="table"
data-toggle="table"
data-url="http://satico.beget.tech/json/google-apps-script.json"
>
<thead>
<tr>
<th data-field="id">Parent ID</th>
<th data-field="title">Parent Title</th>
<th data-field="children[*].guid">Guids</th>
</tr>
</thead>
</table>
我的测试页面http://satico.beget.tech/lib-bootstrap-table.html
我的数据http://satico.beget.tech/json/google-apps-script.json
开始将 Bootstrap Table 添加到 Bootstrap v5 https://bootstrap-table.com/themes/bootstrap5/
问题是来自 http://satico.beget.tech/json/google-apps-script.json 的数据返回的是单个对象而不是数组。 Bootstrap Table 要求来自 data-url
的数据是一个 JSON 数组。
我正在尝试通过设置 data-url=""
从远程 URL 加载数据。 Bootstrap v4 一切正常,但是当我使用最新版本的 Bootstrap (v5.0.1) 时,数据未加载。
我尝试了不同的选项:仅 Bootstrap 与 Popper 捆绑,jQuery + Bootstrap 与 Popper 捆绑或单独的脚本解决方案,但似乎没有任何效果。
<table
id="table"
data-toggle="table"
data-url="http://satico.beget.tech/json/google-apps-script.json"
>
<thead>
<tr>
<th data-field="id">Parent ID</th>
<th data-field="title">Parent Title</th>
<th data-field="children[*].guid">Guids</th>
</tr>
</thead>
</table>
我的测试页面http://satico.beget.tech/lib-bootstrap-table.html
我的数据http://satico.beget.tech/json/google-apps-script.json
开始将 Bootstrap Table 添加到 Bootstrap v5 https://bootstrap-table.com/themes/bootstrap5/
问题是来自 http://satico.beget.tech/json/google-apps-script.json 的数据返回的是单个对象而不是数组。 Bootstrap Table 要求来自 data-url
的数据是一个 JSON 数组。