From 6307998938bfa048b2bf0f8b78e31d9bd0c02cd7 Mon Sep 17 00:00:00 2001 From: qinzhenpen Date: Fri, 30 Aug 2024 17:05:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=8C=E7=BA=A7=E7=9B=AE?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/sidebar.scss | 71 +++++--- src/layout/components/Sidebar/SidebarItem.vue | 1 + src/layout/components/Sidebar/index.vue | 5 +- src/router/index.js | 158 +++++++++++++++++- src/views/digitalMarketTech/index.vue | 15 +- .../components/emotion-analysis.vue | 12 +- .../digitalMarketingAlgorithms/index.vue | 13 ++ src/views/portraitModel/index.vue | 28 +++- 8 files changed, 259 insertions(+), 44 deletions(-) diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index aea1243..72d904a 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -1,22 +1,22 @@ #app { .main-container { - height:calc(100% - 58px); + height: calc(100% - 58px); transition: margin-left .28s; margin-left: $base-sidebar-width; position: relative; - + } .sidebarHide { - margin-left: 0!important; + margin-left: 0 !important; } .sidebar-container { -webkit-transition: width .28s; transition: width 0.28s; width: 239px !important; - background:url('../images/sidebar-background.webp') no-repeat center; + background: url('../images/sidebar-background.webp') no-repeat center; // background-color: $base-menu-background; background-size: 100% 100%; height: 100%; @@ -27,8 +27,8 @@ left: 0; z-index: 1001; overflow: hidden; - -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35); - box-shadow: 2px 0 6px rgba(0,21,41,.35); + -webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, .35); + box-shadow: 2px 0 6px rgba(0, 21, 41, .35); // reset element-ui css .horizontal-collapse-transition { @@ -72,29 +72,59 @@ height: 100%; width: 100% !important; background-color: transparent !important; - padding-top: 20px; - padding-left: 10px; - .el-menu-item{ - position: relative; + padding: 25px 18px; + + .el-sub-menu { + margin-bottom: 20px; + + .el-sub-menu__title { + height: 37px; + background: url('../images/sidebar-normal.png') no-repeat; + background-size: 100% 100% !important; + } + + .el-menu { + padding: 1px 18px !important; + + .el-menu-item { + min-width: 100% !important; + height: 37px; + color: #fff; + padding-left: 4px; + background: transparent !important; + margin-bottom: 0px; + + &:hover { + background: transparent !important; + } + } + } + } + + .el-menu-item { display: flex; align-items: center; - // margin: 15px 0px; margin-bottom: 20px; height: 37px; - width: 213px; - // margin-left: -8px; color: #fff; background: url('../images/sidebar-normal.png') no-repeat; - background-size:100% 100% !important; + background-size: 100% 100% !important; } - .is-active{ + + .is-active { background: url('../images/sidebar-active.png') no-repeat !important; - background-size:100% 100%; - } + // background-size: 100% 100% !important; + + .el-sub-menu__title { + background: url('../images/sidebar-active.png') no-repeat !important; + background-size: 100% 100% !important; + } + } } - .el-menu-item, .menu-title { + .el-menu-item, + .menu-title { // overflow: hidden !important; // text-overflow: ellipsis !important; // white-space: nowrap !important; @@ -112,7 +142,7 @@ } } - & .theme-dark .is-active > .el-sub-menu__title { + & .theme-dark .is-active>.el-sub-menu__title { color: $base-menu-color-active !important; } @@ -180,6 +210,7 @@ visibility: hidden; display: inline-block; } + &>i { height: 0; width: 0; @@ -259,4 +290,4 @@ border-radius: 20px; } } -} +} \ No newline at end of file diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index f2a913f..da1df23 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -10,6 +10,7 @@ + {{ resolvePath(item.path)}}