前端框架用的是easyui-treegrid这个东西,毕竟不是做前台的,就只能带个框架了。
这个东西,都帮你搞定了,但是,需要测试一下怎么用,按照api上的试试,没有问题,但是,你自己做一下,估计就会出现问题了。不多说,这个还是第二次出现这个问题,第一次我以为(仅仅是我以为)我会记住这个问题,但是,现在再做的时候,又忘了。
treegrid 这个数据,属性不多说,就是,数据格式啊,下一级别的属性,必须用children。
[{
"id":1,
"name":"C",
"size":"",
"date":"02/19/2010",
"children":[{
"id":2,
"name":"Program Files",
"size":"120 MB",
"date":"03/20/2010",
"children":[{
"id":21,
"name":"Java",
"size":"",
"date":"01/13/2010",
"state":"closed",
"children":[{
"id":211,
"name":"java.exe",
"size":"142 KB",
"date":"01/13/2010"
},{
"id":212,
"name":"jawt.dll",
"size":"5 KB",
"date":"01/13/2010"
}]
},{
"id":22,
"name":"MySQL",
"size":"",
"date":"01/13/2010",
"state":"closed",
"children":[{
"id":221,
"name":"my.ini",
"size":"10 KB",
"date":"02/26/2009"
},{
"id":222,
"name":"my-huge.ini",
"size":"5 KB",
"date":"02/26/2009"
},{
"id":223,
"name":"my-large.ini",
"size":"5 KB",
"date":"02/26/2009"
}]
}]
不然出来的只有第一级别的对象。好记性不如烂笔头