easyui异步树,一开始全展开

来源:互联网 发布:淘宝达人粉丝怎么刷 编辑:程序博客网 时间:2024/04/30 01:04
  • 文件夹节点+1,下面的会发这末多次响应 ,响应太多了,并且还要向数据库查询文件夹节点+1次
$('#t').tree({    url : 'aAction!Tree.action',    lines : true,    checked : true,    onLoadSuccess : function(node,data){        var t=$(this);        if(data){            $(data).each(function(index,d){                if(this.state=='expandAll'){                    t.tree('expandAll');                }            });        }    }    });
  • 如果你不想这末繁琐的话,可以在后台写 ,返回带children属性的 json
原创粉丝点击