<script type="text/javascript">
$(function(){
$('div.middle-center').layout({
center__paneSelector:".inner-center",west__paneSelector:".inner-west",east__paneSelector:"false",north__paneSelector:"false",south__paneSelector:"false",west__size:194,spacing_open:5,spacing_closed:5,west__spacing_closed:5
});
$("#weastCotent").height($('div.middle-center').height()-35);
//Tree
var o = { showcheck: true };
o.data = typedata;
$("#tree").treeview(o);
})
</script>
<div id='weastCotent'><div id='tree'></div></div>
其中 o.data = typedata;
typedata的结果是
treedata = [
{ "id": "0", "text": "身份类别", "value": "80", "showcheck": false, complete: true, "isexpand": true, "checkstate": 0},
{ "id": "1", "text": "新闻类别", "value": "81", "showcheck": false, complete: true, "isexpand": true, "checkstate": 0},
{ "id": "2", "text": "通知类别", "value": "82", "showcheck": false, complete: true, "isexpand": true, "checkstate": 1}]
求子节点的数据类型
现在父节点我已经显示数来了 我想知道子节点的数据类型应该是怎么样的
ChildNodes: [{ id: "3", text: "身份类别1", value: "81", hasChildren: false, isexpand: false,
complete: true, ChildNodes: null},{ id: "3", text: "身份类别4", value: "81", hasChildren: false,
isexpand: false, complete: true, ChildNodes: null}]
继续求帮助啊 这段代码应该是放在 checkstate的后面吗
{ "id": "0", "text": "身份类别", "value": "80", "showcheck": false, complete: true, "isexpand": true, "checkstate": 0,ChildNodes: [{ id: "3", text: "身份类别1", value: "81", hasChildren: false, isexpand: false,
complete: true, ChildNodes: null},{ id: "3", text: "身份类别4", value: "81", hasChildren: false,
isexpand: false, complete: true, ChildNodes: null}]},
这么放格式对吗 ?可是结果还是不显示 啊
@飞翔的鱼: hasChildren: true
高手 求QQ啊
@yuyangtudou:
{ "id": "0", "text": "教工3菜单", "value": "80", "showcheck": false, complete: false, "isexpand": true, "checkstate": 1, "ChildNodes": [{ "id": "3", "text": "身份类别1", "value": "81", "hasChildren": true, "isexpand": false, "complete": true, "ChildNodes": null }, { "id": "3", "text": "身份类别4", "value": "81", "hasChildren": true, "isexpand": false, "complete": true, "ChildNodes": null}] }
改了 还是没反应啊 真心 求帮忙
@飞翔的鱼:
{ "id": "0", "text": "教工3菜单", "value": "80",hasChildren:true, "showcheck": false,
complete: false, "isexpand": true, "checkstate": 1,
"ChildNodes": [{ "id": "3", "text": "身份类别1", "value": "81", "hasChildren": true,
"isexpand": false, "complete": true, "ChildNodes": null },
{ "id": "3", "text": "身份类别4", "value": "81", "hasChildren": true, "isexpand": false,
"complete": true, "ChildNodes": null}] }