Merge branch 'master' of https://gitee.com/shepf/pig into dev

This commit is contained in:
冷冷 2020-09-28 08:21:30 +08:00
commit 3b800f54d4
3 changed files with 5 additions and 1 deletions

View File

@ -107,6 +107,7 @@ public class MenuTree extends TreeNode implements Serializable {
this.label = menuVo.getName(); this.label = menuVo.getName();
this.sort = menuVo.getSort(); this.sort = menuVo.getSort();
this.keepAlive = menuVo.getKeepAlive(); this.keepAlive = menuVo.getKeepAlive();
this.hasChildren = false;
} }
} }

View File

@ -41,6 +41,8 @@ public class TreeNode {
protected List<TreeNode> children = new ArrayList<TreeNode>(); protected List<TreeNode> children = new ArrayList<TreeNode>();
protected Boolean hasChildren;
public void add(TreeNode node) { public void add(TreeNode node) {
children.add(node); children.add(node);
} }

View File

@ -59,6 +59,7 @@ public class TreeUtil {
treeNode.setChildren(new ArrayList<>()); treeNode.setChildren(new ArrayList<>());
} }
treeNode.add(it); treeNode.add(it);
treeNode.setHasChildren(true);
} }
} }
} }
@ -117,7 +118,7 @@ public class TreeUtil {
node.setIcon(menu.getIcon()); node.setIcon(menu.getIcon());
node.setType(menu.getType()); node.setType(menu.getType());
node.setSort(menu.getSort()); node.setSort(menu.getSort());
node.setHasChildren(true); node.setHasChildren(false);
node.setKeepAlive(menu.getKeepAlive()); node.setKeepAlive(menu.getKeepAlive());
trees.add(node); trees.add(node);
} }