From 1272e8fe7d8b9b3955d20c071eb5c0d55a5f8bb6 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期三, 20 十二月 2023 14:44:50 +0800 Subject: [PATCH] fix 修复 append-to-body 编写错误 --- src/views/system/user/profile/userAvatar.vue | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/system/user/profile/userAvatar.vue b/src/views/system/user/profile/userAvatar.vue index 0796765..ce25c11 100644 --- a/src/views/system/user/profile/userAvatar.vue +++ b/src/views/system/user/profile/userAvatar.vue @@ -1,6 +1,6 @@ <template> <div class="user-info-head" @click="editCropper()"> - <img :src="options.img as string" title="鐐瑰嚮涓婁紶澶村儚" class="img-circle img-lg" /> + <img :src="options.img" title="鐐瑰嚮涓婁紶澶村儚" class="img-circle img-lg" /> <el-dialog :title="title" v-model="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog"> <el-row> <el-col :xs="24" :md="12" :style="{ height: '350px' }"> @@ -62,7 +62,7 @@ import useUserStore from "@/store/modules/user"; interface Options { - img: string | ArrayBuffer | null; // 瑁佸壀鍥剧墖鐨勫湴鍧� + img: string | any; // 瑁佸壀鍥剧墖鐨勫湴鍧� autoCrop: boolean; // 鏄惁榛樿鐢熸垚鎴浘妗� autoCropWidth: number; // 榛樿鐢熸垚鎴浘妗嗗搴� autoCropHeight: number; // 榛樿鐢熸垚鎴浘妗嗛珮搴� @@ -140,7 +140,7 @@ const res = await uploadAvatar(formData); open.value = false; options.img = res.data.imgUrl; - userStore.avatar = options.img as string + userStore.setAvatar(options.img as string) proxy?.$modal.msgSuccess("淇敼鎴愬姛"); visible.value = false; }); -- Gitblit v1.9.3