mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-25 02:58:43 +08:00
perf: 头像上传组件返回值增加后端接口的返回值 (#2244)
This commit is contained in:
parent
692df33fd8
commit
dfe560a542
@ -91,9 +91,9 @@
|
||||
},
|
||||
);
|
||||
|
||||
function handleUploadSuccess({ source }) {
|
||||
function handleUploadSuccess({ source, data }) {
|
||||
sourceValue.value = source;
|
||||
emit('change', source);
|
||||
emit('change', { source, data });
|
||||
createMessage.success(t('component.cropper.uploadSuccess'));
|
||||
}
|
||||
|
||||
|
@ -65,10 +65,11 @@
|
||||
return avatar || headerImg;
|
||||
});
|
||||
|
||||
function updateAvatar(src: string) {
|
||||
function updateAvatar({ src, data }) {
|
||||
const userinfo = userStore.getUserInfo;
|
||||
userinfo.avatar = src;
|
||||
userStore.setUserInfo(userinfo);
|
||||
console.log('data', data);
|
||||
}
|
||||
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user