fix:【ele/antd】修复更新个人信息后菜单丢失问题

Signed-off-by: zlflying <zlflying@qq.com>
This commit is contained in:
zlflying
2026-01-14 14:44:17 +08:00
parent c894617e10
commit d5b49e6a3b
2 changed files with 10 additions and 6 deletions

View File

@@ -4,18 +4,19 @@ import type { SystemUserProfileApi } from '#/api/system/user/profile';
import { onMounted, ref } from 'vue';
import { Page } from '@vben/common-ui';
import { useUserStore } from '@vben/stores';
import { Card, Tabs } from 'ant-design-vue';
import { getAuthPermissionInfoApi } from '#/api';
import { getUserProfile } from '#/api/system/user/profile';
import { useAuthStore } from '#/store';
import BaseInfo from './modules/base-info.vue';
import ProfileUser from './modules/profile-user.vue';
import ResetPwd from './modules/reset-pwd.vue';
import UserSocial from './modules/user-social.vue';
const authStore = useAuthStore();
const userStore = useUserStore();
const activeName = ref('basicInfo');
/** 加载个人信息 */
@@ -30,7 +31,8 @@ async function refreshProfile() {
await loadProfile();
// 更新 store
await authStore.fetchUserInfo();
const authPermissionInfo = await getAuthPermissionInfoApi();
userStore.setUserInfo(authPermissionInfo.user);
}
/** 初始化 */

View File

@@ -4,18 +4,19 @@ import type { SystemUserProfileApi } from '#/api/system/user/profile';
import { onMounted, ref } from 'vue';
import { Page } from '@vben/common-ui';
import { useUserStore } from '@vben/stores';
import { ElCard, ElTabPane, ElTabs } from 'element-plus';
import { getAuthPermissionInfoApi } from '#/api';
import { getUserProfile } from '#/api/system/user/profile';
import { useAuthStore } from '#/store';
import BaseInfo from './modules/base-info.vue';
import ProfileUser from './modules/profile-user.vue';
import ResetPwd from './modules/reset-pwd.vue';
import UserSocial from './modules/user-social.vue';
const authStore = useAuthStore();
const userStore = useUserStore();
const activeName = ref('basicInfo');
/** 加载个人信息 */
@@ -30,7 +31,8 @@ async function refreshProfile() {
await loadProfile();
// 更新 store
await authStore.fetchUserInfo();
const authPermissionInfo = await getAuthPermissionInfoApi();
userStore.setUserInfo(authPermissionInfo.user);
}
/** 初始化 */