feat: 个人信息页和修改密码页支持深色模式,添加独立修改密码功能

- 个人信息页和修改密码页适配 Vben 深色模式
- 头像下拉菜单新增修改密码入口,跳转 /system/change-password
- 新增独立修改密码页面(/system/change-password)
- 新增 changePasswordApi 调用后端 /user/change-password 接口
- 新增路由文件和相关 locale
This commit is contained in:
小蟑螂
2026-04-20 01:30:37 +08:00
parent 5e8864b355
commit 2b23e46d87
7 changed files with 231 additions and 10 deletions
@@ -75,6 +75,8 @@ const switchAccountModalRef = ref();
const SwitchAccountIcon = createIconifyIcon('lucide:arrow-left-right');
// 用户图标
const UserIcon = createIconifyIcon('lucide:user');
// 锁图标
const LockIcon = createIconifyIcon('lucide:lock');
const menus = computed(() => {
const menuItems = [];
@@ -87,6 +89,14 @@ const menus = computed(() => {
icon: UserIcon,
text: '个人信息',
});
// 修改密码
menuItems.push({
handler: () => {
router.push('/system/change-password');
},
icon: LockIcon,
text: '修改密码',
});
// 只有超级管理员才显示切换账户功能
if (accessStore.userRole === 'super') {
@@ -99,6 +109,8 @@ const menus = computed(() => {
});
}
return menuItems;
});