【发布时间】:2016-10-31 14:25:48
【问题描述】:
最近我尝试使用可编辑表格,但是当我编辑一列时,整个表格结构都会受到影响,我将其显示为屏幕截图。
最初,
我的html,
<div class="widget-body">
<table class="table table-hover">
<thead>
<tr>
<th class="hidden-xs-down">#</th>
<th> <a (click)='getstudents(1)'>Account Name</a></th>
<th class="hidden-xs-down"> <a (click)='getstudents(1)'>Phone</a></th>
<th class="hidden-xs-down"> <a (click)='getstudents(1)'>Account Name ALias</a></th>
<th></th>
</tr>
</thead>
<tbody>
<tr *ngFor = 'let student of students'>
<td class="hidden-xs-down">{{id}}</td>
<td contenteditable="true">
<a>{{student.accountname}}</a>
</td>
<td contenteditable="true" class ='phone'>
{{student.phone}}
</td><i class = 'glyphicon glyphicon-pencil'></i>
<td contenteditable="true">
{{student.accountownername}}
</td>
<td>
<div class="btn-group" dropdown>
<button id="dropdown-btn-one" class="btn btn-xs" dropdownToggle>
<i class="fa fa-caret-down"></i>
</button>
<ul class="dropdown-menu dropdown-menu-right" dropdownMenu role="menu" aria-labelledby="dropdown-btn-one">
<li role="menuitem"><a class="dropdown-item pull-left" (click) = 'getstudentbyid(student._id)' data-toggle="modal" data-target="#editmodel">Edit</a></li>
<li role="menuitem"><a class="dropdown-item" (click) = 'deletestudentbyid(student._id)'>Delete</a></li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
有人可以提供帮助吗。谢谢。
【问题讨论】:
标签: jquery html css twitter-bootstrap