1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

feat: Break long menu items into multiple lines (#7665)

This commit is contained in:
2025-01-08 11:31:36 +08:00 committed by GitHub
parent 8922395fdc
commit 8d69da7702
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,7 @@
:collapse-transition="false" :collapse-transition="false"
:unique-opened="true" :unique-opened="true"
@select="handleMenuClick" @select="handleMenuClick"
class="custom-menu"
> >
<SubItem :menuList="routerMenus" /> <SubItem :menuList="routerMenus" />
<el-menu-item :index="''"> <el-menu-item :index="''">
@ -168,7 +169,7 @@ const search = async () => {
rstMenuList.push(menuItem); rstMenuList.push(menuItem);
} else { } else {
menuItem.children.forEach((child: any) => { menuItem.children.forEach((child: any) => {
if (child.hidden == undefined || child.hidden == false) { if (!child.hidden) {
menuChildren.push(child); menuChildren.push(child);
} }
}); });
@ -193,6 +194,13 @@ onMounted(() => {
<style lang="scss"> <style lang="scss">
@import './index.scss'; @import './index.scss';
.custom-menu .el-menu-item {
white-space: normal !important;
word-break: break-word;
overflow-wrap: break-word;
line-height: normal;
}
.sidebar-container { .sidebar-container {
position: relative; position: relative;
display: flex; display: flex;