diff --git a/src/layout/components/Header.vue b/src/layout/components/Header.vue index 36d5baf..98f804f 100644 --- a/src/layout/components/Header.vue +++ b/src/layout/components/Header.vue @@ -4,46 +4,37 @@ - 长沙市公安局局长信箱即接即办系统 + 长沙市公安局局长信箱即接即办平台 -
-
- - {{ - userStore.userInfo.deptName + " " + userStore.userInfo.name - }} - -
- - 退出 - - -
- +
+ + {{ userStore.userInfo.fullName }} +
+ - @@ -58,7 +49,6 @@ header { font-size: 3.89vh; font-weight: 700; letter-spacing: 4px; - a { text-decoration: none; color: inherit; @@ -68,49 +58,28 @@ header { } } } - .gap{ - position: relative;/* 设置相对定位 */ - display: inline-block;/* 让元素具有块级元素和行内元素的特性,即将块级元素转化为内联元素 */ - - .dropdown-content { - border-radius: 20px 20px 20px 20px; - display: none; - position: absolute; - background-color: #f9f9f9; - z-index: 100; - min-width: 160px; - box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); - padding: 12px 16px; - a{ - display: inline-block; - z-index: 289; - color: black; - font-size: 2.4vh; - cursor:pointer; - } - } -} - -.gap:hover .dropdown-content { - display: block; -} - -.nav2 a { - color: black; - padding: 12px 16px; - display: block;/* 将a标签设置为块级标签 */ -} -.gap:hover .nav2 { - display: block; + .userinfo { + margin-right: 8px; + } } - .el-button { - --el-font-size-base: 18px; - --el-button-bg-color: #283aac; - --el-button-border-color: #586eff; - height: 36px; +.userinfo-dropdown { + position: fixed; + right: 16px; + top: calc(var(--header-height) - 8px); + background: #FFFFFF; + box-shadow: 0px 9px 28px 8px rgba(0,0,0,0.05), 0px 6px 16px 0px rgba(0,0,0,0.08), 0px 3px 6px -4px rgba(0,0,0,0.12); + border-radius: 8px; + margin: 0; + padding: 12px 0; + z-index: 999; + overflow: hidden; + li { + padding: 12px 16px; + font-size: 16px; &:hover { - --el-button-hover-bg-color: var(--el-button-bg-color); - --el-button-hover-border-color: #fff; + cursor: pointer; + font-weight: 700; + color: var(--primary-color); } } }