EasyUi之Tree1

来源:互联网 发布:python opencv框出人脸 编辑:程序博客网 时间:2024/06/08 02:19

主页:

<ul id="box">

</ul>

js页面

$(function(){
$('#box').tree({
url:'../js/code/tree.json',
animate:true,
checkbox:true,
lines:true
});
});

json页面

[
{
"id":1,
"text":"系统管理",
"iconCls":"icon-save",
"children":[
{
"text":"主机信息",
"state":"closed",
"children":[
{
"text":"新增主机",
"checked":true
},
{
"text":"修改主机"

}
]

},
{
"text":"更新信息"

},
{
"text":"程序信息"

}
]
},
{
"id":2,
"text":"会员管理",
"children":[
{
"text":"新增管理"

},
{
"text":"修改管理"

}
]
}
]

两个必不可少:

1、[]表示json

2、text必不可少

3、children必不可少

示例:


若加入lines则为:


0 0
原创粉丝点击