style: optimize code styles

This commit is contained in:
RockYang
2023-06-18 15:17:59 +08:00
parent e7fd29b9cb
commit cd809d17d3
4 changed files with 26 additions and 18 deletions

View File

@@ -67,7 +67,7 @@
<script setup>
import {computed, defineEmits, defineProps, onMounted, ref} from "vue"
import {computed, onMounted, ref} from "vue"
import {httpGet, httpPost} from "@/utils/http";
import {ElMessage} from "element-plus";
@@ -91,7 +91,7 @@ onMounted(() => {
httpGet('/api/user/profile').then(res => {
form.value = res.data
}).catch(() => {
ElMessage.error({message:'获取用户信息失败', appendTo: '#user-info'})
ElMessage.error({message: '获取用户信息失败', appendTo: '#user-info'})
});
})
@@ -104,7 +104,7 @@ const save = function () {
onClose: () => emits('hide', false)
})
// 更新用户数据
emits('update-user', {nickname:form.value['nickname'], avatar: form.value['avatar']});
emits('update-user', {nickname: form.value['nickname'], avatar: form.value['avatar']});
}).catch(() => {
ElMessage.error({
message: '更新失败',