From 9f39dfd0c18e7ab4ecf0fa67698f2c3d4455551a Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 9 May 2025 13:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=BC=E8=88=AA=E6=A0=8F?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=98=B5=E7=A7=B0&=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/icons/svg/more-up.svg | 1 + ruoyi-ui/src/components/RightPanel/index.vue | 106 ------------------ ruoyi-ui/src/layout/components/Navbar.vue | 42 ++++--- .../src/layout/components/Settings/index.vue | 17 +-- ruoyi-ui/src/layout/index.vue | 11 +- ruoyi-ui/src/settings.js | 2 +- ruoyi-ui/src/store/getters.js | 8 +- ruoyi-ui/src/store/modules/user.js | 5 + 8 files changed, 52 insertions(+), 140 deletions(-) create mode 100644 ruoyi-ui/src/assets/icons/svg/more-up.svg delete mode 100644 ruoyi-ui/src/components/RightPanel/index.vue diff --git a/ruoyi-ui/src/assets/icons/svg/more-up.svg b/ruoyi-ui/src/assets/icons/svg/more-up.svg new file mode 100644 index 00000000..d30ac11c --- /dev/null +++ b/ruoyi-ui/src/assets/icons/svg/more-up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ruoyi-ui/src/components/RightPanel/index.vue b/ruoyi-ui/src/components/RightPanel/index.vue deleted file mode 100644 index 25ce3f81..00000000 --- a/ruoyi-ui/src/components/RightPanel/index.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - - - diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index 14db4d34..258a9474 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -25,23 +25,24 @@ - +
- + {{ nickName }}
个人中心 - - 布局设置 - 退出登录
+ +
+ +
@@ -58,6 +59,7 @@ import RuoYiGit from '@/components/RuoYi/Git' import RuoYiDoc from '@/components/RuoYi/Doc' export default { + emits: ['setLayout'], components: { Breadcrumb, TopNav, @@ -72,17 +74,12 @@ export default { ...mapGetters([ 'sidebar', 'avatar', - 'device' + 'device', + 'nickName' ]), setting: { get() { return this.$store.state.settings.showSettings - }, - set(val) { - this.$store.dispatch('settings/changeSetting', { - key: 'showSettings', - value: val - }) } }, topNav: { @@ -95,6 +92,9 @@ export default { toggleSideBar() { this.$store.dispatch('app/toggleSideBar') }, + setLayout(event) { + this.$emit('setLayout') + }, logout() { this.$confirm('确定注销并退出系统吗?', '提示', { confirmButtonText: '确定', @@ -173,17 +173,25 @@ export default { } .avatar-container { - margin-right: 30px; + margin-right: 0px; + padding-right: 0px; .avatar-wrapper { - margin-top: 5px; + margin-top: 10px; position: relative; .user-avatar { cursor: pointer; - width: 40px; - height: 40px; - border-radius: 10px; + width: 30px; + height: 30px; + border-radius: 50%; + } + + .user-nickname{ + position: relative; + bottom: 10px; + font-size: 14px; + font-weight: bold; } .el-icon-caret-bottom { diff --git a/ruoyi-ui/src/layout/components/Settings/index.vue b/ruoyi-ui/src/layout/components/Settings/index.vue index 39043a06..8e24cae1 100644 --- a/ruoyi-ui/src/layout/components/Settings/index.vue +++ b/ruoyi-ui/src/layout/components/Settings/index.vue @@ -1,5 +1,5 @@