提交 5cff73bc 作者: vben

fix: fix the problem of collapsed display when the menu has no child nodes

上级 88de82c4
...@@ -248,14 +248,14 @@ ...@@ -248,14 +248,14 @@
} }
&.ant-menu-inline-collapsed { &.ant-menu-inline-collapsed {
.ant-menu-submenu-selected,
.ant-menu-item-selected { .ant-menu-item-selected {
.active-style(); background: unset !important;
box-shadow: none;
} }
.ant-menu-submenu-selected,
.ant-menu-item-selected { .ant-menu-item-selected {
background: unset !important; .active-style();
box-shadow: none;
} }
} }
} }
......
...@@ -46,11 +46,13 @@ export default defineComponent({ ...@@ -46,11 +46,13 @@ export default defineComponent({
if (homeRoute.name === firstItem.name) return false; if (homeRoute.name === firstItem.name) return false;
return homeRoute; return homeRoute;
} }
function pathCompile(path: string) { function pathCompile(path: string) {
const { params } = unref(currentRoute); const { params } = unref(currentRoute);
const toPath = compile(path); const toPath = compile(path);
return toPath(params); return toPath(params);
} }
function handleItemClick(item: AppRouteRecordRaw) { function handleItemClick(item: AppRouteRecordRaw) {
const { redirect, path, meta } = item; const { redirect, path, meta } = item;
if (meta.disabledRedirect) return; if (meta.disabledRedirect) return;
...@@ -71,10 +73,8 @@ export default defineComponent({ ...@@ -71,10 +73,8 @@ export default defineComponent({
); );
return () => ( return () => (
<>
<Breadcrumb class="layout-breadcrumb"> <Breadcrumb class="layout-breadcrumb">
{() => ( {() => (
<>
<TransitionGroup name="breadcrumb"> <TransitionGroup name="breadcrumb">
{() => { {() => {
return unref(itemList).map((item) => { return unref(itemList).map((item) => {
...@@ -98,10 +98,8 @@ export default defineComponent({ ...@@ -98,10 +98,8 @@ export default defineComponent({
}); });
}} }}
</TransitionGroup> </TransitionGroup>
</>
)} )}
</Breadcrumb> </Breadcrumb>
</>
); );
}, },
}); });
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论