diff --git a/src/components/dialog/UserAddEditDialog.vue b/src/components/dialog/UserAddEditDialog.vue index 03bfff9f..07772e8a 100644 --- a/src/components/dialog/UserAddEditDialog.vue +++ b/src/components/dialog/UserAddEditDialog.vue @@ -79,7 +79,7 @@ function changeAvatar(file: Event) { const { files } = file.target as HTMLInputElement if (files && files.length > 0) { const selectedFile = files[0] - const allowedTypes = ['image/jpeg', 'image/png', 'image/gif'] + const allowedTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/webp'] const maxSize = 800 * 1024 // 检查文件是否为图片 if (!allowedTypes.includes(selectedFile.type)) { @@ -299,7 +299,7 @@ onMounted(() => { -
允许 JPG、PNG、GIF 格式, 最大尺寸 800KB。
+允许 JPG、PNG、GIF、WEBP 格式, 最大尺寸 800KB。
允许 JPG、PNG、GIF 格式, 最大尺寸 800KB。
+允许 JPG、PNG、GIF、WEBP 格式, 最大尺寸 800KB。