做网站|网站建设,就上易助科技网

前端技术文档及相关资料下载

关于前端html、css、js等技术上的各种疑难棘手问题的解决方案探讨及相关资料下载!

JQuery树形表插件treetable
来源:易助科技网浏览量:3收藏

简介

treetable是一款JQuery树形表插件。


使用

1.  引入 jquery.js 和 treetable.js 文件


2.  HTML

<table class="table table-hover table-responsive main-list" id="columntable">
<tr>
<th class="">教材名称/章名称/节名称/单元名称/知识点名称</th>
<th class="text-center">重点、常考</th>
<th class="text-center">难点</th>
<th class="text-center">基础</th>
<th class="text-right">
<a href="">导出</a>
基础</th>
</tr>
<tr ng-repeat="item in treeLists" data-tt-id="{{item.id}}" data-tt-parent-id="{{item.parentid}}" on-finish-render-filters>
<td class="">
{{item.name}}
</td>
<td class="text-center">{{item.emphasis}}</td>
<td class="text-center">{{item.difficulty}}</td>
<td class="text-center">{{item.basis}}</td>
<td class="text-right"><a ui-sref="node-weight-info">查看</a></td>
</tr>
</table>


3.  调用

注意:data-tt-id="{{item.id}}" data-tt-parent-id="{{item.parentid}}" 得加上。

$('#columntable').treetable({expandable:false},true);


相关链接

官网地址 :https://plugins.jquery.com/treetable/

GitHub  地址 :https://github.com/ludo/jquery-treetable