easyUi 中 tree 框架的属性有:
修改原有展开样式代码如下:
onExpand:function(node,param){
$(this).children("li").each(function(){
if($(this).children("ul").length>0){
$(this).children("ul").hide();
$(this).children("div.tree-node").find(".tree-hit").addClass("tree-collapsed").removeClass("tree-expanded");
$(this).children("div.tree-node").find(".tree-icon").removeClass("tree-folder-open");
if($(this).children("div.tree-node").find(".tree-title").text()==node.text){
$(this).children("ul").show();
$(this).children("ul").css({'position':'absolute','top':'20px','left':'60px','width':'300px','height':'650px','overflow-y':'auto'})
$(this).children("div.tree-node").find(".tree-hit").addClass("tree-expanded").removeClass("tree-collapsed");
$(this).children("div.tree-node").find(".tree-icon").addClass("tree-folder-open");
}
}
});
}