diff --git a/src/components/IconSelect/index.vue b/src/components/IconSelect/index.vue index a275954..1cd0023 100644 --- a/src/components/IconSelect/index.vue +++ b/src/components/IconSelect/index.vue @@ -2,7 +2,7 @@
diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index 204b19b..4459cdf 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -18,8 +18,8 @@ { removeToken(); }; + const setAvatar = (value: string) => { + avatar.value = value; + }; + return { userId, token, @@ -72,7 +76,8 @@ export const useUserStore = defineStore('user', () => { permissions, login, getInfo, - logout + logout, + setAvatar }; }); diff --git a/src/views/register.vue b/src/views/register.vue index c2dd6a3..ad78cf1 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -105,12 +105,12 @@ const registerRules: ElFormRules = { const codeUrl = ref(""); const loading = ref(false); const captchaEnabled = ref(true); -const registerRef = ref(ElForm); +const registerRef = ref(); // 租户列表 const tenantList = ref([]); const handleRegister = () => { - registerRef.value.validate(async (valid: boolean) => { + registerRef.value?.validate(async (valid: boolean) => { if (valid) { loading.value = true; const [err] = await to(register(registerForm.value)); diff --git a/src/views/system/user/profile/userAvatar.vue b/src/views/system/user/profile/userAvatar.vue index 0796765..5acfb76 100644 --- a/src/views/system/user/profile/userAvatar.vue +++ b/src/views/system/user/profile/userAvatar.vue @@ -1,6 +1,6 @@