mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2026-06-27 08:04:26 +00:00
update 优化 路由接口返回ext扩展数据
This commit is contained in:
@@ -44,6 +44,11 @@ public class RouterVo {
|
||||
*/
|
||||
private String query;
|
||||
|
||||
/**
|
||||
* 扩展字段
|
||||
*/
|
||||
private String ext;
|
||||
|
||||
/**
|
||||
* 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
|
||||
*/
|
||||
|
||||
+3
@@ -166,6 +166,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
router.setPath(menu.getRouterPath());
|
||||
router.setComponent(menu.getComponentInfo());
|
||||
router.setQuery(menu.getQueryParam());
|
||||
router.setExt(menu.getExt());
|
||||
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals(SystemConstants.NO, menu.getIsCache()), menu.getPath(), menu.getActiveMenu()));
|
||||
List<SysMenu> cMenus = menu.getChildren();
|
||||
if (CollUtil.isNotEmpty(cMenus) && SystemConstants.TYPE_DIR.equals(menu.getMenuType())) {
|
||||
@@ -182,6 +183,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
children.setName(frameName);
|
||||
children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals(SystemConstants.NO, menu.getIsCache()), menu.getPath(), menu.getActiveMenu()));
|
||||
children.setQuery(menu.getQueryParam());
|
||||
children.setExt(menu.getExt());
|
||||
childrenList.add(children);
|
||||
router.setChildren(childrenList);
|
||||
} else if (menu.getParentId().equals(Constants.TOP_PARENT_ID) && menu.isInnerLink()) {
|
||||
@@ -195,6 +197,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
children.setComponent(SystemConstants.INNER_LINK);
|
||||
children.setName(innerLinkName);
|
||||
children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), menu.getPath()));
|
||||
children.setExt(menu.getExt());
|
||||
childrenList.add(children);
|
||||
router.setChildren(childrenList);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user