EasyUI-初始化异步树直接全部展开

$(function(){
 $('#t_funinfo_tree').tree({
  checkbox: true,
  url:"<%=basePath %>/getT_FuninfoTree.do?pid='00000'",
  onBeforeExpand:function(node)
  {
   $('#t_funinfo_tree').tree('options').url="<%=basePath %>/getT_FuninfoTree.do?pid="+node.id;
  },
  lines:true,
  onLoadSuccess:function(node,data){
          var t = $(this);
      if(data){
       $(data).each(function(index,d){
   if(this.state == 'closed'){
       t.tree('expandAll');
   }
       });
  }
     }
  
 });
});

posted @ 2015-07-11 17:45  韩慧兵  阅读(363)  评论(0编辑  收藏  举报