mirror of https://gitee.com/maxjhandsome/pig
Merge branch 'master' of https://gitee.com/shepf/pig into dev
This commit is contained in:
commit
3b800f54d4
|
@ -107,6 +107,7 @@ public class MenuTree extends TreeNode implements Serializable {
|
|||
this.label = menuVo.getName();
|
||||
this.sort = menuVo.getSort();
|
||||
this.keepAlive = menuVo.getKeepAlive();
|
||||
this.hasChildren = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ public class TreeNode {
|
|||
|
||||
protected List<TreeNode> children = new ArrayList<TreeNode>();
|
||||
|
||||
protected Boolean hasChildren;
|
||||
|
||||
public void add(TreeNode node) {
|
||||
children.add(node);
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ public class TreeUtil {
|
|||
treeNode.setChildren(new ArrayList<>());
|
||||
}
|
||||
treeNode.add(it);
|
||||
treeNode.setHasChildren(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,7 +118,7 @@ public class TreeUtil {
|
|||
node.setIcon(menu.getIcon());
|
||||
node.setType(menu.getType());
|
||||
node.setSort(menu.getSort());
|
||||
node.setHasChildren(true);
|
||||
node.setHasChildren(false);
|
||||
node.setKeepAlive(menu.getKeepAlive());
|
||||
trees.add(node);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue