diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index d0a08c4..61746a2 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -5,6 +5,7 @@ + {{ hasTitle2(onlyOneChild.meta.title) }} @@ -45,6 +46,10 @@ const props = defineProps({ basePath: { type: String, default: '' + }, + isCollapse: { + type: Boolean, + default: false } }) @@ -102,4 +107,12 @@ function hasTitle(title) { return '' } } + +function hasTitle2(title) { + if (title.length >= 1) { + return title.charAt(0) + '...' + } else { + return '' + } +} diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 7683035..fe86291 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -11,7 +11,12 @@ :collapse-transition="false" background-color="transparent" mode="vertical"> - +