opt: update the main chat compnent after updating the user profile

This commit is contained in:
RockYang
2023-06-15 11:29:16 +08:00
parent 1e84332119
commit 088fd14c03
3 changed files with 18 additions and 12 deletions

View File

@@ -73,6 +73,7 @@ import {ElMessage} from "element-plus";
const props = defineProps({
show: Boolean,
user: Object,
models: Array,
});
@@ -102,6 +103,8 @@ const save = function () {
appendTo: document.getElementById('user-info'),
onClose: () => emits('update:show', false)
})
// 更新用户数据
emits('update-user', {nickname:form.value['nickname'], avatar: form.value['avatar']});
}).catch(() => {
ElMessage.error({
message: '更新失败',