mirror of
https://gitee.com/ulthon/layui-ul.git
synced 2026-07-09 13:42:48 +08:00
修改目录的说明;
This commit is contained in:
@@ -144,10 +144,10 @@
|
|||||||
<p>目录数据,示例:</p>
|
<p>目录数据,示例:</p>
|
||||||
<p>
|
<p>
|
||||||
[{
|
[{
|
||||||
id: 0,
|
id: 0, //必须 <br>
|
||||||
pid: 0,
|
pid: 0, <br>
|
||||||
title: 0,
|
title: 0, <br>
|
||||||
options: 同列表设置,如果不需要请设置为空数组
|
options: 同列表设置,如果不需要请设置为空数组 <br>
|
||||||
}]
|
}]
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
@@ -162,6 +162,21 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>appendItem(item)</td>
|
||||||
|
<td>
|
||||||
|
<p>将目录向上移动,没有返回值</p>
|
||||||
|
<p>参数:</p>
|
||||||
|
<p>item:list的其中一个目录数据,必须有id属性</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>renderList()</td>
|
||||||
|
<td>
|
||||||
|
<p>当调用了appendItem之后,必须调用renderList,才能显示,没有参数</p>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>itemMoveUp(item)</td>
|
<td>itemMoveUp(item)</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ function renderUlTree(options) {
|
|||||||
var itemSetting = $.extend({}, defaults, data);
|
var itemSetting = $.extend({}, defaults, data);
|
||||||
|
|
||||||
settings.list.push(itemSetting);
|
settings.list.push(itemSetting);
|
||||||
this.initList()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.initList = function () {
|
this.initList = function () {
|
||||||
@@ -124,6 +124,7 @@ function renderUlTree(options) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.renderList = function () {
|
this.renderList = function () {
|
||||||
|
this.initList()
|
||||||
thisDom.find('.ul-tree-item').each(function (index, elem) {
|
thisDom.find('.ul-tree-item').each(function (index, elem) {
|
||||||
|
|
||||||
tthis.renderItem(elem)
|
tthis.renderItem(elem)
|
||||||
|
|||||||
Reference in New Issue
Block a user