Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-22 03:49:19 +08:00

Merge 9c353c416ccb8dc455877ba418590bccca44333c into 52a5cb8dc65fa74544e9087779f1aebdede07775

This commit is contained in:
淳冉 2024-12-03 15:08:27 +08:00 committed by GitHub
commit ac16a6e716
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,7 @@ const resolvePath = (routePath: string) => {
</script>
<template>
<template v-if="!alwaysShowRootMenu && theOnlyOneChild && !theOnlyOneChild.children">
<template v-if="!alwaysShowRootMenu && theOnlyOneChild && (!theOnlyOneChild.children || theOnlyOneChild.children.filter((item: any) => !item.meta?.hidden).length === 0)">
<SidebarItemLink v-if="theOnlyOneChild.meta" :to="resolvePath(theOnlyOneChild.path)">
<el-menu-item :index="resolvePath(theOnlyOneChild.path)">
<SvgIcon v-if="theOnlyOneChild.meta.svgIcon" :name="theOnlyOneChild.meta.svgIcon" />