diff --git a/ruoyi-fastapi-frontend/src/assets/icons/svg/more-up.svg b/ruoyi-fastapi-frontend/src/assets/icons/svg/more-up.svg new file mode 100644 index 0000000..d30ac11 --- /dev/null +++ b/ruoyi-fastapi-frontend/src/assets/icons/svg/more-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ruoyi-fastapi-frontend/src/layout/components/Navbar.vue b/ruoyi-fastapi-frontend/src/layout/components/Navbar.vue index e3a4cc7..f85c813 100644 --- a/ruoyi-fastapi-frontend/src/layout/components/Navbar.vue +++ b/ruoyi-fastapi-frontend/src/layout/components/Navbar.vue @@ -29,27 +29,26 @@ -
- -
- - -
- +
@@ -79,13 +78,13 @@ function toggleSideBar() { function handleCommand(command) { switch (command) { case "setLayout": - setLayout(); - break; + setLayout() + break case "logout": - logout(); - break; + logout() + break default: - break; + break } } @@ -96,14 +95,14 @@ function logout() { type: 'warning' }).then(() => { userStore.logOut().then(() => { - location.href = '/index'; + location.href = '/index' }) - }).catch(() => { }); + }).catch(() => { }) } const emits = defineEmits(['setLayout']) function setLayout() { - emits('setLayout'); + emits('setLayout') } function toggleTheme() { @@ -161,7 +160,7 @@ function toggleTheme() { padding: 0 8px; height: 100%; font-size: 18px; - color: var(--navbar-text); + color: #5a5e66; vertical-align: text-bottom; &.hover-effect { @@ -188,17 +187,28 @@ function toggleTheme() { } .avatar-container { - margin-right: 40px; + margin-right: 0px; + padding-right: 0px; .avatar-wrapper { - margin-top: 5px; + margin-top: 10px; + right: 8px; position: relative; .user-avatar { cursor: pointer; - width: 40px; - height: 40px; - border-radius: 10px; + width: 30px; + height: 30px; + margin-right: 8px; + border-radius: 50%; + } + + .user-nickname{ + position: relative; + left: 0px; + // bottom: 10px; + font-size: 14px; + font-weight: bold; } i { diff --git a/ruoyi-fastapi-frontend/src/store/modules/user.js b/ruoyi-fastapi-frontend/src/store/modules/user.js index 1e59417..2c6398f 100644 --- a/ruoyi-fastapi-frontend/src/store/modules/user.js +++ b/ruoyi-fastapi-frontend/src/store/modules/user.js @@ -10,6 +10,7 @@ const useUserStore = defineStore( token: getToken(), id: '', name: '', + nickName: '', avatar: '', roles: [], permissions: [] @@ -48,6 +49,7 @@ const useUserStore = defineStore( } this.id = user.userId this.name = user.userName + this.nickName = user.nickName this.avatar = avatar resolve(res) }).catch(error => {