1. Method 1
var tree = L5.getCmp(' edocOutfileRelationTree');
//Add selection tree, nodes will automatically collapse
tree.on("click", function(node,e){
node.getUI().toggleCheck(true);
});
tree.root.expand();
2. Method 2
var tree = L5.getCmp('orgstrutree');
//Add a selection tree and the nodes will automatically collapse
tree.on("click" , function(node,e){
if(node.expanded==false){
node.expand();
}else{
node.collapse();
}
});
Used in conjunction with:
var tree = L5.getCmp('orgstrutree');
//Add selection tree, nodes will automatically collapse
tree.on("click", function(node,e){
var organType = node.record.get("organType");
if(organType == "8"){
node.getUI().toggleCheck(true);
}else{
if(node.expanded==false){
node.expand();
}else{
node.collapse();
}
}
});
} >
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn