diff --git a/src/assets/icons/svg/menuIcon.svg b/src/assets/icons/svg/menuIcon.svg new file mode 100644 index 00000000..d85e2067 --- /dev/null +++ b/src/assets/icons/svg/menuIcon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 2b0ec69d..24b024d2 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -80,7 +80,7 @@ .submenu-title-noDropdown, .el-submenu__title { &:hover { - background-color: rgba(0, 0, 0, 0.06) !important; + background-color: #0b58ff !important; } } diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index 1357bc9e..72bc6296 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -37,14 +37,14 @@ $base-sub-menu-hover:#001528; */ $base-menu-color: #fff; $base-menu-color-active:#fff; -$base-menu-background:#001529; +$base-menu-background:#1E1651; $base-logo-title-color: #ffffff; $base-menu-light-color:rgba(0,0,0,.70); $base-menu-light-background:#ffffff; $base-logo-light-title-color: #001529; -$base-sub-menu-background:#0B253F; +$base-sub-menu-background:#15063C; $base-sub-menu-hover:#0b50ff; diff --git a/src/components/TopNav/index.vue b/src/components/TopNav/index.vue index ce0b21a9..9f9bae0a 100644 --- a/src/components/TopNav/index.vue +++ b/src/components/TopNav/index.vue @@ -53,8 +53,6 @@ export default { return { // 顶部栏初始数 visibleNumber: 5, - // 当前激活菜单的 index - // currentIndex: undefined, }; }, computed: { @@ -140,10 +138,10 @@ export default { methods: { // 根据宽度计算设置显示栏数 setVisibleNumber() { - const width = window.innerWidth - 800; + const width = window.innerWidth - 700; console.log(width); console.log('window.innerWidth:', window.innerWidth); - this.visibleNumber = parseInt(width / 100); + this.visibleNumber = parseInt(width / 120); console.log('this.visibleNumber:', this.visibleNumber); }, // 菜单选择事件 @@ -181,6 +179,7 @@ export default { }, // 当前激活的路由 activeRoutes(key) { + this.$store.dispatch('app/setChoicepart', key); const routes = []; if (this.childrenMenus && this.childrenMenus.length > 0) { this.childrenMenus.map((item) => { diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 15c86487..615e077b 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -1,66 +1,66 @@ diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index be3285df..30873bd5 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -17,7 +17,9 @@ export default { const vnodes = [] if (icon) { - vnodes.push() + vnodes.push() + } else { + vnodes.push() } if (title) { diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index c64efd0f..420f3d76 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -4,7 +4,7 @@ :class="{ collapse: collapse }" :style="{ backgroundColor: - sideTheme === 'theme-dark' ? '#1f2d3d' : variables.menuLightBackground, + sideTheme === 'theme-dark' ? '#1E1651' : variables.menuLightBackground, }"> - - - - - - - diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 81fac875..ead3a7bc 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -1,6 +1,7 @@