侧边栏key调整
This commit is contained in:
parent
b5c789a267
commit
b16b860b63
@ -13,8 +13,8 @@
|
|||||||
mode="vertical"
|
mode="vertical"
|
||||||
>
|
>
|
||||||
<sidebar-item
|
<sidebar-item
|
||||||
v-for="route in permission_routes"
|
v-for="(route, index) in permission_routes"
|
||||||
:key="route.path"
|
:key="route.path + index"
|
||||||
:item="route"
|
:item="route"
|
||||||
:base-path="route.path"
|
:base-path="route.path"
|
||||||
/>
|
/>
|
||||||
|
@ -140,7 +140,7 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
{
|
{
|
||||||
RouterVo router = new RouterVo();
|
RouterVo router = new RouterVo();
|
||||||
router.setHidden("1".equals(menu.getVisible()));
|
router.setHidden("1".equals(menu.getVisible()));
|
||||||
router.setName(StringUtils.capitalize(menu.getPath()));
|
router.setName(getRouteName(menu));
|
||||||
router.setPath(getRouterPath(menu));
|
router.setPath(getRouterPath(menu));
|
||||||
router.setComponent(getComponent(menu));
|
router.setComponent(getComponent(menu));
|
||||||
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
|
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
|
||||||
@ -299,6 +299,23 @@ public class SysMenuServiceImpl implements ISysMenuService
|
|||||||
return UserConstants.UNIQUE;
|
return UserConstants.UNIQUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取路由名称
|
||||||
|
*
|
||||||
|
* @param menu 菜单信息
|
||||||
|
* @return 路由名称
|
||||||
|
*/
|
||||||
|
public String getRouteName(SysMenu menu)
|
||||||
|
{
|
||||||
|
String routerName = StringUtils.capitalize(menu.getPath());
|
||||||
|
// 非外链并且是一级目录(类型为目录)
|
||||||
|
if (isMeunFrame(menu))
|
||||||
|
{
|
||||||
|
routerName = StringUtils.EMPTY;
|
||||||
|
}
|
||||||
|
return routerName;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取路由地址
|
* 获取路由地址
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user