diff --git a/src/components/dialog/UserAddEditDialog.vue b/src/components/dialog/UserAddEditDialog.vue index cf42e778..e1cf2691 100644 --- a/src/components/dialog/UserAddEditDialog.vue +++ b/src/components/dialog/UserAddEditDialog.vue @@ -83,7 +83,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)) { @@ -303,7 +303,7 @@ onMounted(() => { -
允许 JPG、PNG、GIF 格式, 最大尺寸 800KB。
+允许 JPG、PNG、GIF、WEBP 格式, 最大尺寸 800KB。
允许 JPG、PNG、GIF 格式, 最大尺寸 800KB。
+允许 JPG、PNG、GIF、WEBP 格式, 最大尺寸 800KB。