🎨新增客户端离线通知选项配置以及监听任务
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { FormInstance } from "element-plus";
|
||||
import { generateAvatar } from "@/api/user";
|
||||
|
||||
// 声明 props 类型
|
||||
export interface FormProps {
|
||||
@@ -41,11 +42,29 @@ function getUserEditFormRef() {
|
||||
return userEditFormRef.value;
|
||||
}
|
||||
|
||||
// 切换头像
|
||||
const changeAvatar = () => {
|
||||
generateAvatar().then(res => {
|
||||
if (res.code === 200) {
|
||||
userEditForm.value.avatar = res.data;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
defineExpose({ getUserEditFormRef });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<el-form ref="userEditFormRef" :model="userEditForm" label-width="20%">
|
||||
<el-form-item prop="avatar">
|
||||
<el-avatar
|
||||
style="cursor: pointer; margin-left: 25%"
|
||||
size="large"
|
||||
fit="cover"
|
||||
:src="userEditForm.avatar"
|
||||
@click="changeAvatar()"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
prop="name"
|
||||
label="名称"
|
||||
|
Reference in New Issue
Block a user