diff --git a/src/layout/components/LayoutSider.vue b/src/layout/components/LayoutSider.vue index 69f737f..16be42e 100644 --- a/src/layout/components/LayoutSider.vue +++ b/src/layout/components/LayoutSider.vue @@ -1,64 +1,60 @@ @@ -93,7 +89,7 @@ const userInitial = computed(() => username.charAt(0).toUpperCase()) // ─── Icon helper ─── function renderIcon(icon: Component) { - return () => h(NIcon, { size: 18 }, { default: () => h(icon) }) + return () => h(NIcon, null, { default: () => h(icon) }) } function renderDropdownIcon(icon: Component) { @@ -116,6 +112,7 @@ const menuOptions: MenuOption[] = [ { key: 'plugin', label: '插件管理', icon: renderIcon(ExtensionPuzzleOutline), disabled: true }, { key: 'settings', label: '系统设置', icon: renderIcon(SettingsOutline), disabled: true }, ] + const activeMenuKey = computed(() => route.path) function onMenuSelect(key: string) { @@ -146,13 +143,6 @@ function onUserAction(key: string) { --n-sider-border-color: var(--color-border, #E5E6EB); } -.sider-wrapper { - display: flex; - flex-direction: column; - height: 100%; - overflow: visible; -} - .sider-logo { display: flex; align-items: center; @@ -179,27 +169,16 @@ function onUserAction(key: string) { white-space: nowrap; } -.sider-menu { - flex: 1; - overflow: visible; - padding: 8px; - min-height: 0; -} - -.sider-menu :deep(.n-menu) { - --n-item-height: 40px; - --n-border-radius: 6px; - --n-font-size: 14px; - --n-item-icon-size: 18px; -} - .sider-user { + position: absolute; + bottom: 0; + left: 0; + right: 0; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--color-border, #E5E6EB); - flex-shrink: 0; } .user-meta {