From a809b8abb6918a52d518c9f62b89884f73930367 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Thu, 2 Dec 2021 13:54:05 +0800 Subject: [PATCH] ddd --- src/assets/scss/main-shuju.scss | 100 +++++++++------- src/router/index.js | 14 ++- src/views/main-shuju/main-navbar.vue | 168 ++++++++++++++------------- 3 files changed, 160 insertions(+), 122 deletions(-) diff --git a/src/assets/scss/main-shuju.scss b/src/assets/scss/main-shuju.scss index ce4ca79d..190f8aef 100644 --- a/src/assets/scss/main-shuju.scss +++ b/src/assets/scss/main-shuju.scss @@ -1,5 +1,5 @@ -@import '~@/element-ui/theme-variables.scss'; -@import './variables.scss'; +@import "~@/element-ui/theme-variables.scss"; +@import "./variables.scss"; // $navbar--height: 60px; body { @@ -72,8 +72,8 @@ body { background-color: transparent; } &-add { - > span > *[class*='el-icon-'], - > span > *[class*='icon'] { + > span > *[class*="el-icon-"], + > span > *[class*="icon"] { vertical-align: middle; font-size: 18px; margin-right: 5px; @@ -233,17 +233,13 @@ body { font-family: FZZCHJW; font-weight: normal; color: #ffffff; - background: linear-gradient( - 0deg, - #03c7ff 24.609375%, - #ffffff 81.0791015625% - ); + background: linear-gradient(0deg, #03c7ff 24.609375%, #ffffff 81.0791015625%); -webkit-background-clip: text; -webkit-text-fill-color: rgba(#fff, 0.7); &::before { position: absolute; - content: ''; + content: ""; z-index: 100000; display: block; bottom: -10px; @@ -289,13 +285,15 @@ body { text-decoration: none; } &.z-div { - .el-menu-item { + .el-menu-item, + .sub-menu { position: relative; - &.is-active { + &.is-active, + &.z-on { &::before { position: absolute; - content: ''; + content: ""; display: block; bottom: -6px; left: 0; @@ -317,7 +315,7 @@ body { &::after { position: absolute; - content: ''; + content: ""; right: 0; top: 0; bottom: 0; @@ -328,8 +326,41 @@ body { } } } + + .sub-menu { + position: relative; + float: left; + cursor: pointer; + &:hover { + .sub-menu-list { + display: block; + } + } + + .sub-menu-list { + position: absolute; + display: none; + padding: 0 10px; + width: 120px; + left: -100px; + right: -100px; + margin: 0 auto; + background-color: rgba(#176dec, 0.9); + text-align: center; + cursor: pointer; + > div { + border-top: 1px dashed rgba(#fff, 0.4); + color: rgba(#fff, 0.7); + transition: all ease 0.5s; + &:hover { + color: #fff; + } + } + } + } + .el-menu-item, - .el-submenu > .el-submenu__title { + .sub-menu { height: $navbar--height; padding: 0 15px; line-height: $navbar--height; @@ -337,14 +368,12 @@ body { color: #fff; } .el-menu-item.is-active, - .el-submenu.is-active > .el-submenu__title { + .sub-menu.z-on { color: #fff; font-weight: bold; - &:focus, - &:hover { - } } - .el-menu-item { + .el-menu-item, + .sub-menu { i { color: #fff; } @@ -388,9 +417,10 @@ body { } } } + .navbar__search { - > *[class*='el-icon-'], - > *[class*='icon'] { + > *[class*="el-icon-"], + > *[class*="icon"] { display: inline-block; vertical-align: middle; } @@ -446,9 +476,7 @@ body { min-height: calc(#{$content--fill-height} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc( - #{$content--fill-height} - #{$content--card-header-height} - 2px - ); + min-height: calc(#{$content--fill-height} - #{$content--card-header-height} - 2px); } &--tabs { padding: $content--tabs-header-height 0 0; @@ -520,7 +548,7 @@ body { position: absolute; bottom: 0; left: 0; - content: ''; + content: ""; width: 100%; height: 2px; background-color: $--color-primary; @@ -553,15 +581,10 @@ body { min-height: calc(#{$content--fill-height-tabs} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc( - #{$content--fill-height-tabs} - #{$content--card-header-height} - - 2px - ); + min-height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); } &.is-iframe { - height: calc( - #{$content--fill-height-tabs} + #{$content--padding * 2} - ); + height: calc(#{$content--fill-height-tabs} + #{$content--padding * 2}); margin: -$content--padding; min-height: auto; > .aui-card--fill { @@ -580,10 +603,7 @@ body { background-color: #fff; } > .aui-card--fill > .el-card__header + .el-card__body { - height: calc( - #{$content--fill-height-tabs} - #{$content--card-header-height} - - 2px - ); + height: calc(#{$content--fill-height-tabs} - #{$content--card-header-height} - 2px); } } } @@ -613,7 +633,7 @@ body { /* Page ------------------------------ */ -*[class*='aui-page__'] { +*[class*="aui-page__"] { padding-top: 0; .aui-content { min-height: auto; @@ -625,9 +645,7 @@ body { min-height: calc(100vh - #{$content--padding * 2} - 2px); } > .aui-card--fill > .el-card__header + .el-card__body { - min-height: calc( - 100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px - ); + min-height: calc(100vh - #{$content--padding * 2} - #{$content--card-header-height} - 2px); } } } diff --git a/src/router/index.js b/src/router/index.js index dbf8448e..d997154b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -229,9 +229,21 @@ router.beforeEach((to, from, next) => { window.SITE_CONFIG["menuShujuList"] = [ { icon: "icon-setting", - id: "2", + id: "22213213", name: "基础信息", url: "visual/basicinfo/basicInfoMain", + children: [ + { + url: "/visual/basicinfo/basicInfoMain", + name: "基础信息", + id: "5feawfwaefwa5", + }, + { + url: "/visual/basicinfo/basicInfoMain", + name: "人员类别分析", + id: "5fwaefwaefawef5", + }, + ], }, { icon: "icon-setting", diff --git a/src/views/main-shuju/main-navbar.vue b/src/views/main-shuju/main-navbar.vue index 181e7d51..19c148a4 100644 --- a/src/views/main-shuju/main-navbar.vue +++ b/src/views/main-shuju/main-navbar.vue @@ -1,13 +1,10 @@ -