【发布时间】:2021-05-08 09:57:17
【问题描述】:
我想在这个引导表中添加一个复选框,而不是“#”符号……请给我任何参考,我可以从中了解如何做这些事情,就像我们有关于引导表的明确文档一样。 ...我只需将该代码复制到我的 vs 代码中
这是我从这个链接https://getbootstrap.com/docs/4.4/content/tables/复制的代码:
<table class="table table-dark">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
【问题讨论】:
-
将
<th scope="col">#</th>更改为<th scope="col"><input type="checkbox" /></th> -
您是否在文件中添加了 Bootstrap 4 CDN。
标签: reactjs bootstrap-4 react-bootstrap react-bootstrap-table