0

我是 ztree Jquery 插件的新手。请有人用下面的代码帮助我理解 id 和 pid 之间的关系。

var zNodes =[
    {id:1, pId:0, name:"[core] Basic Functions", open:true},
    {id:101, pId:1, name:"Standard JSON Data"},
    {id:102, pId:1, name:"Simple JSON Data"},
    {id:103, pId:1, name:"Don't Show Line"},
    {id:104, pId:1, name:"Don't Show Icon"},
    {id:105, pId:1, name:"Custom Icon - icon"},
    {id:106, pId:1, name:"Custom Icon - iconSkin"},
    {id:107, pId:1, name:"Custom Fonts"},

    {id:2, pId:0, name:"[excheck] Checkbox & Radio", open:false},
    {id:201, pId:2, name:"Checkbox Operation"},
    {id:202, pId:2, name:"Checkbox nocheck Demo"},
    {id:203, pId:2, name:"Checkbox chkDisabled Demo"}
    ]

提前致谢。

4

0 回答 0