87,903
社区成员
发帖
与我相关
我的任务
分享
<table id="treeTable" class="table table-hover">
<thead>
<tr>
<th>ID</th>
<th>名称</th>
<th>管理</th>
</tr>
</thead>
<tbody>
<c:forEach items="${list}" var="list">
<tr id="${list.id}" pid="${list.parentId}" >
<td width="10%">${list.id}</td>
<td width="60%">${list.name}</td>
<td>
<a href="#" type="button" href="#" class="btn btn-sm btn-primary"><i class="fa fa-edit"></i>编辑</a>
<button onclick="" type="button" class="btn btn-sm btn-danger"><i class="fa fa-trash"></i>删除</button>
<a href="#" type="button" class="btn btn-sm btn-default"><i class="fa fa-plus"></i>新建一下级分类</a>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<script type="text/javascript">
$(function(){
var option = {
expandLevel : 2
};
$('#treeTable').treeTable(option);
});
</script>