Browse Source

Merge pull request #1247 from colinin/fixed-1246

fix(vben5): Fixed the concurrent error in updating profile
pull/1249/head
yx lin 1 year ago
committed by GitHub
parent
commit
e4883ee048
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      apps/vben5/packages/@abp/account/src/components/MySetting.vue
  2. 2
      apps/vben5/packages/@abp/account/src/components/components/BasicSettings.vue

1
apps/vben5/packages/@abp/account/src/components/MySetting.vue

@ -164,6 +164,7 @@ onMounted(async () => {
v-if="selectedMenuKeys[0] === 'basic'" v-if="selectedMenuKeys[0] === 'basic'"
:profile="myProfile" :profile="myProfile"
@submit="onUpdateProfile" @submit="onUpdateProfile"
@picture-change="onGetProfile"
/> />
<BindSettings v-else-if="selectedMenuKeys[0] === 'bind'" /> <BindSettings v-else-if="selectedMenuKeys[0] === 'bind'" />
<SecuritySettings <SecuritySettings

2
apps/vben5/packages/@abp/account/src/components/components/BasicSettings.vue

@ -28,6 +28,7 @@ const props = defineProps<{
profile: ProfileDto; profile: ProfileDto;
}>(); }>();
const emits = defineEmits<{ const emits = defineEmits<{
(event: 'pictureChange'): void;
(event: 'submit', profile: UpdateProfileDto): void; (event: 'submit', profile: UpdateProfileDto): void;
}>(); }>();
const FormItem = Form.Item; const FormItem = Form.Item;
@ -61,6 +62,7 @@ async function onAvatarChange(_param: UploadChangeParam) {
state.userInfo && (state.userInfo.avatar = URL.createObjectURL(picture)); state.userInfo && (state.userInfo.avatar = URL.createObjectURL(picture));
}); });
message.success($t('AbpUi.SavedSuccessfully')); message.success($t('AbpUi.SavedSuccessfully'));
emits('pictureChange');
} finally { } finally {
pictureState.value.uploading = false; pictureState.value.uploading = false;
} }

Loading…
Cancel
Save