From 3b3fb80231f74eecfe2e98e9a7968bfc405bc37f Mon Sep 17 00:00:00 2001 From: LiuHao <liuhaoai545@gmail.com> Date: 星期日, 18 六月 2023 23:47:10 +0800 Subject: [PATCH] add 新增路由跳转自定义title --- src/views/system/user/profile/index.vue | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue index 341c08d..21638e3 100644 --- a/src/views/system/user/profile/index.vue +++ b/src/views/system/user/profile/index.vue @@ -69,23 +69,23 @@ import { getUserProfile } from "@/api/system/user"; const activeTab = ref("userinfo"); -const state = ref<{ user: any; roleGroup: string; postGroup: string}>({ - user: {}, - roleGroup: '', - postGroup: '' +const state = ref<Record<string, any>>({ + user: {}, + roleGroup: '', + postGroup: '' }); const userForm = ref({}); const getUser = async () => { - const res = await getUserProfile(); - state.value.user = res.data.user; - userForm.value = { ...res.data.user } - state.value.roleGroup = res.data.roleGroup; - state.value.postGroup = res.data.postGroup; + const res = await getUserProfile(); + state.value.user = res.data.user; + userForm.value = { ...res.data.user } + state.value.roleGroup = res.data.roleGroup; + state.value.postGroup = res.data.postGroup; }; onMounted(() => { - getUser(); + getUser(); }) </script> -- Gitblit v1.9.3