diff --git a/src/layout/components/sidebar/sidebarItem.vue b/src/layout/components/sidebar/sidebarItem.vue index c918174..d3ede24 100644 --- a/src/layout/components/sidebar/sidebarItem.vue +++ b/src/layout/components/sidebar/sidebarItem.vue @@ -31,6 +31,19 @@ const props = defineProps({ } }); +const getExtraIconStyle = computed((): CSSProperties => { + if (useAppStoreHook().getSidebarStatus) { + return { + position: "absolute", + right: "10px" + }; + } else { + return { + position: "static" + }; + } +}); + const getNoDropdownStyle = computed((): CSSProperties => { return { display: "flex", @@ -177,6 +190,9 @@ function resolvePath(routePath) { @@ -221,6 +237,9 @@ function resolvePath(routePath) { diff --git a/src/style/sidebar.scss b/src/style/sidebar.scss index 691c738..86a10ac 100644 --- a/src/style/sidebar.scss +++ b/src/style/sidebar.scss @@ -306,6 +306,10 @@ height: 48px; line-height: 48px; background: $menuBg; + + svg { + position: static !important; + } } .is-active > .el-sub-menu__title, @@ -600,16 +604,6 @@ body[layout="vertical"] { } } - .el-sub-menu { - overflow: hidden; - - & > .el-sub-menu__title { - .el-sub-menu__icon-arrow { - display: none; - } - } - } - /* 菜单折叠 */ .el-menu--collapse { .el-sub-menu {