强化前端格式检测
This commit is contained in:
@@ -42,7 +42,7 @@ async function handleAvatarFileChange(event: Event) {
|
||||
if (!file) return
|
||||
|
||||
uploadingAvatar.value = true
|
||||
const toast = showToast({
|
||||
const loadingToast = showToast({
|
||||
type: 'loading',
|
||||
message: '上传中...',
|
||||
forbidClick: true,
|
||||
@@ -56,6 +56,7 @@ async function handleAvatarFileChange(event: Event) {
|
||||
} catch (error) {
|
||||
showToast({ message: readError(error, '上传失败'), icon: 'cross' })
|
||||
} finally {
|
||||
loadingToast.close()
|
||||
uploadingAvatar.value = false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user