feat: 添加个人信息编辑页面

- 创建 /system/profile 路由
- 创建个人信息编辑页面,支持编辑姓名、手机号、备注
- 支持上传头像
- 用户下拉菜单添加"个人信息"入口
This commit is contained in:
小蟑螂
2026-03-27 22:35:00 +08:00
parent 26a9da6508
commit 9414048af9
3 changed files with 239 additions and 1 deletions
@@ -16,7 +16,7 @@ import {
} from '@vben/layouts';
import { preferences } from '@vben/preferences';
import { useAccessStore, useUserStore } from '@vben/stores';
import { openWindow } from '@vben/utils';
import { openWindow, navigateTo } from '@vben/utils';
import ImportTaskButton from '#/components/ImportTaskButton.vue';
import SwitchAccountModal from '#/components/SwitchAccountModal.vue';
@@ -74,10 +74,21 @@ const switchAccountModalRef = ref();
// 切换账户图标
const SwitchAccountIcon = createIconifyIcon('lucide:arrow-left-right');
// 用户图标
const UserIcon = createIconifyIcon('lucide:user');
const menus = computed(() => {
const menuItems = [];
// 个人信息
menuItems.push({
handler: () => {
navigateTo('/system/profile');
},
icon: UserIcon,
text: '个人信息',
});
// 只有超级管理员才显示切换账户功能
if (accessStore.userRole === 'super') {
menuItems.push({