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.label = menuVo.getName();
|
||||||
this.sort = menuVo.getSort();
|
this.sort = menuVo.getSort();
|
||||||
this.keepAlive = menuVo.getKeepAlive();
|
this.keepAlive = menuVo.getKeepAlive();
|
||||||
|
this.hasChildren = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue