diff --git a/frontend/components.d.ts b/frontend/components.d.ts index dad9fe68a..a2be18cd0 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -36,7 +36,6 @@ declare module 'vue' { ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] - ElDraw: typeof import('element-plus/es')['ElDraw'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] ElDropdown: typeof import('element-plus/es')['ElDropdown'] ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] @@ -44,7 +43,6 @@ declare module 'vue' { ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElFooter: typeof import('element-plus/es')['ElFooter'] ElForm: typeof import('element-plus/es')['ElForm'] - ElFormColumn: typeof import('element-plus/es')['ElFormColumn'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] diff --git a/frontend/src/components/app-layout/menu/index.scss b/frontend/src/components/app-layout/menu/index.scss index cca63c1c2..ce0a75fa7 100644 --- a/frontend/src/components/app-layout/menu/index.scss +++ b/frontend/src/components/app-layout/menu/index.scss @@ -3,17 +3,16 @@ display: flex; flex-direction: column; height: 100%; - background-color: #191a20; + background-color: $menu-backgroup-color; + transition: all 0.3s ease; .logo { box-sizing: border-box; height: 55px; - border-bottom: 1px solid #282a35; - box-shadow: 2px 0 6px rgb(0 21 41 / 35%); span { font-size: 22px; font-weight: bold; - color: #dadada; + color: $primary-color; white-space: nowrap; } img { @@ -37,27 +36,89 @@ text-align: center; } } + .el-menu, .el-menu--popup { + padding: 4px; + background: none !important; + .el-menu-item { + border-radius: 4px !important; + background-color: $menu-item-backgroup-color; + margin: 10px; + height: 44px !important; + + span { + color: rgba(31, 35, 41, 1); + } + .el-icon { + color: rgba(31, 35, 41, 1); + } + &.is-active { - background-color: #060708; + background-color: #ffffff; + + border: 2px solid $primary-color; + + span { + color: $primary-color; + } + + .el-icon { + color: $primary-color; + } + &::before { position: absolute; - top: 0; - bottom: 0; - left: 0; + border-radius: 4px; + top: 13px; + bottom: 15px; + left: 12px; width: 4px; + height: 14px; content: ''; background: $primary-color; } } } -} -.menu-href { - display: inline-block; - width: 100%; - height: 100%; - color: #bdbdc0; - text-decoration: none; + + :deep .el-sub-menu { + margin: 10px; + + span { + color: rgba(31, 35, 41, 1); + } + .el-icon { + color: rgba(31, 35, 41, 1); + } + + .el-sub-menu__title { + background-color: $menu-item-backgroup-color !important; + height: 44px; + border-radius: 4px !important; + } + + &.is-opened, + &.is-active { + .el-sub-menu__title { + span { + color: $primary-color; + } + + .el-icon { + color: $primary-color; + } + } + } + + .el-menu { + background-color: $menu-item-backgroup-color; + } + .el-menu-item { + border-radius: 4px !important; + margin-left: 0px !important; + min-width: 100% !important; + height: 44px; + } + } } diff --git a/frontend/src/components/app-layout/menu/index.vue b/frontend/src/components/app-layout/menu/index.vue index fd6167059..4a4b98249 100644 --- a/frontend/src/components/app-layout/menu/index.vue +++ b/frontend/src/components/app-layout/menu/index.vue @@ -48,10 +48,9 @@ import { GlobalStore } from '@/store'; const route = useRoute(); const menuStore = MenuStore(); const globalStore = GlobalStore(); -// const activeMenu = computed((): string => route.path); -const activeMenu = computed(() => { +const activeMenu = computed((): string => { const { meta, path } = route; - if (meta.activeMenu) { + if (typeof meta.activeMenu === 'string') { return meta.activeMenu; } return path; diff --git a/frontend/src/layout/layout-content.vue b/frontend/src/layout/layout-content.vue index 26aa74221..867b36d1a 100644 --- a/frontend/src/layout/layout-content.vue +++ b/frontend/src/layout/layout-content.vue @@ -57,8 +57,9 @@