fix: 布局horizontal-mix选择目录跳转首个子菜单
This commit is contained in:
@@ -12,7 +12,10 @@ const { routerPushByKey } = useRouterPush();
|
|||||||
|
|
||||||
function handleSelectMixMenu(menu: App.Global.Menu) {
|
function handleSelectMixMenu(menu: App.Global.Menu) {
|
||||||
setActiveFirstLevelMenuKey(menu.key);
|
setActiveFirstLevelMenuKey(menu.key);
|
||||||
|
// 选择首个子菜单
|
||||||
|
if (Array.isArray(menu.children) && menu.children.length > 0) {
|
||||||
|
routerPushByKey(menu.children[0].routeKey);
|
||||||
|
}
|
||||||
if (!menu.children?.length) {
|
if (!menu.children?.length) {
|
||||||
routerPushByKey(menu.routeKey);
|
routerPushByKey(menu.routeKey);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user