From 5c85c9efda90c4a362a30daea2c6b40b91a12673 Mon Sep 17 00:00:00 2001 From: qinzhenpen <11463128+qinzhenpen@user.noreply.gitee.com> Date: Sat, 2 Sep 2023 16:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/sidebar.scss | 17 +- src/components/Hamburger/index.vue | 2 +- src/layout/components/Navbar.vue | 15 +- src/layout/index.vue | 1 + src/store/modules/app.js | 4 +- src/views/index.vue | 1025 +++++++++++++++++++++++++++- 6 files changed, 1038 insertions(+), 26 deletions(-) diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 6faa983..8116f38 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -36,7 +36,6 @@ .scrollbar-wrapper { overflow-x: hidden !important; - padding-top: 52px; background: url('../images/侧边栏.png') no-repeat center !important; background-size: 200px 100% !important; } @@ -75,7 +74,13 @@ width: 100% !important; background-color: transparent !important; } - + .el-menu-item.is-active{ + width: 170px; + margin-left: 10px; + color:#fff; + border: 1px solid #13B7DA; + background: linear-gradient(0deg, #30BCE8 0%, #203B79 100%); + } .el-menu-item, .menu-title { overflow: hidden !important; text-overflow: ellipsis !important; @@ -91,7 +96,7 @@ .sub-menu-title-noDropdown, .el-sub-menu__title { &:hover { - background-color: rgba(0, 0, 0, 0.06) !important; + background-color: #2a58a9 !important; } } @@ -104,7 +109,7 @@ min-width: $base-sidebar-width !important; &:hover { - background-color: rgba(0, 0, 0, 0.06) !important; + background-color: #2a58a9 !important; } } @@ -220,8 +225,8 @@ .nest-menu .el-sub-menu>.el-sub-menu__title, .el-menu-item { &:hover { - // you can use $sub-menuHover - background-color: pink !important; + width: 170px; + background-color: #2a58a9 !important; } } diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue index 8b6f7a8..7269fc6 100644 --- a/src/components/Hamburger/index.vue +++ b/src/components/Hamburger/index.vue @@ -17,7 +17,7 @@ defineProps({ isActive: { type: Boolean, - default: false + default: true } }) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index c217cbb..1e62d7d 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -5,7 +5,7 @@
- +
@@ -52,11 +52,11 @@ import { ElMessageBox } from 'element-plus' import Breadcrumb from '@/components/Breadcrumb' import TopNav from '@/components/TopNav' import Hamburger from '@/components/Hamburger' -// import Screenfull from '@/components/Screenfull' -// import SizeSelect from '@/components/SizeSelect' -// import HeaderSearch from '@/components/HeaderSearch' -// import RuoYiGit from '@/components/RuoYi/Git' -// import RuoYiDoc from '@/components/RuoYi/Doc' +import Screenfull from '@/components/Screenfull' +import SizeSelect from '@/components/SizeSelect' +import HeaderSearch from '@/components/HeaderSearch' +import RuoYiGit from '@/components/RuoYi/Git' +import RuoYiDoc from '@/components/RuoYi/Doc' import useAppStore from '@/store/modules/app' import useUserStore from '@/store/modules/user' import useSettingsStore from '@/store/modules/settings' @@ -112,7 +112,6 @@ function setLayout() { width: 100%; height: 50px; z-index: 1000; - .hamburger-container { line-height: 46px; height: 100%; diff --git a/src/layout/index.vue b/src/layout/index.vue index 678b688..3dde2b8 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -59,6 +59,7 @@ function handleClickOutside() { const settingRef = ref(null); function setLayout() { settingRef.value.openSetting(); + } diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 3b26cfe..94f3e70 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -17,7 +17,7 @@ const useAppStore = defineStore( if (this.sidebar.hide) { return false; } - this.sidebar.opened = !this.sidebar.opened + this.sidebar.opened = true this.sidebar.withoutAnimation = withoutAnimation if (this.sidebar.opened) { Cookies.set('sidebarStatus', 1) @@ -27,7 +27,7 @@ const useAppStore = defineStore( }, closeSideBar({ withoutAnimation }) { Cookies.set('sidebarStatus', 0) - this.sidebar.opened = false + this.sidebar.opened = true this.sidebar.withoutAnimation = withoutAnimation }, toggleDevice(device) { diff --git a/src/views/index.vue b/src/views/index.vue index 5d8b54c..5100048 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,11 +1,1018 @@ - - \ No newline at end of file + + + + +