refactor: 优化次导航第一层最深路径解析逻辑

This commit is contained in:
Hooray
2025-07-31 23:05:46 +08:00
parent e086017689
commit 90e69b157a
+1 -1
View File
@@ -93,7 +93,7 @@ export const useMenuStore = defineStore(
})
function getDeepestPath(menu: Menu.recordRaw, rootPath = '') {
let retnPath = ''
if (menu.children) {
if (menu.children?.some(item => item.meta?.menu !== false)) {
const item = menu.children.find(item => item.meta?.menu !== false)
if (item) {
retnPath = getDeepestPath(item, resolveRoutePath(rootPath, menu.path))