【发布时间】:2015-06-19 10:01:45
【问题描述】:
我在完成这项工作时遇到了很多麻烦。本质上,我希望能够单击表格上的一行来展开该行并在其中提供其他信息。我希望它是一种可切换的手风琴风格(抽屉),所以我可以一次打开多个。代码如下。
<div class="row">
<div class="col-md-11">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>S</th>
<th>R</th>
<th>Se</th>
<th>D</th>
<th>Ser</th>
<th>L</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="x in projects | filter:query | filter:quer | orderBy:orderProp">
<td><b>{{x.a}}</b></td>
<td>{{x.b}}</td>
<td><u>{{x.c}}</u></td>
<td>{{x.d}}</td>
<td>{{x.e}}</td>
<td>{{x.f}}</td>
</tr>
</tbody>
</table>
</div>
</div>
它形成一个包含六列的表,这些列将循环记录并生成许多信息集。我希望能够让这些行能够在点击时展开和折叠。
http://plnkr.co/edit/CO7ZHudbfR9TZxGTQfGZ
谢谢。
【问题讨论】:
-
以什么方式展开什么?演示没有额外的数据尚未显示
-
本质上是这样的。 jsfiddle.net/Pixic/VGgbq 但是我希望能够一次扩展多个。
标签: javascript angularjs accordion