mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 02:29:19 +08:00
feat: 个人信息页和修改密码页支持深色模式,添加独立修改密码功能
- 个人信息页和修改密码页适配 Vben 深色模式 - 头像下拉菜单新增修改密码入口,跳转 /system/change-password - 新增独立修改密码页面(/system/change-password) - 新增 changePasswordApi 调用后端 /user/change-password 接口 - 新增路由文件和相关 locale
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user