这是我的 hbs 代码示例。
<div class="table-responsive">
<table class="table table-striped">
<thead>
<th>#Id</th>
<th>{{t 'firstname'}}</th>
<th>{{t 'lastname'}}</th>
<th>{{t 'email'}}</th>
<th>{{t 'username'}}</th>
</thead>
<tbody>
{{#each users as |user|}}
<tr>
<td>
{{#link-to 'profile' user.id}}
{{user.id}}
{{/link-to}}
</td>
<td>
{{#link-to 'profile' user.id}}
{{user.firstname}}
{{/link-to}}
</td>
<td>
{{#link-to 'profile' user.id}}
{{user.lastname}}
{{/link-to}}
</td>
<td>
{{#link-to 'profile' user.id}}
{{user.email}}
{{/link-to}}
</td>
<td>
{{#link-to 'profile' user.id}}
{{user.username}}
{{/link-to}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
如您所见,此面板的每个元素都链接到同一个配置文件,但我想知道是否有办法使整行而不是每个元素都可点击。
这意味着我想在每个{{user.*}}之间单击,而不仅仅是在它们上,以将我发送到个人资料。我已经搜索过了,但是我找不到 bootstrap 和车把的答案。
感谢您的时间!