From f5aaaabaf109b2015ea5b5ed9bbf687f8626c137 Mon Sep 17 00:00:00 2001 From: LCJ-MinYa <1049468118@qq.com> Date: Thu, 12 Jun 2025 16:45:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=89=8D=E7=AB=AF=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/demo/compressImage.vue | 351 +++++++++++++++++++++++++++++++ 1 file changed, 351 insertions(+) create mode 100644 src/views/demo/compressImage.vue diff --git a/src/views/demo/compressImage.vue b/src/views/demo/compressImage.vue new file mode 100644 index 0000000..c5e2f69 --- /dev/null +++ b/src/views/demo/compressImage.vue @@ -0,0 +1,351 @@ + + + + 图片压缩工具 + + + + + 拖拽图片到此处或 点击上传 + + 支持 JPG/PNG/WEBP 格式,大小不超过 10MB + + + + + + + + + 压缩模式 + + + + + + + + 质量: {{ quality }}% + + + + + + 宽度(px): {{ targetWidth }} + + + + + + 输出格式 + + + + + + + + + + + + 开始压缩 + + + + + + + 压缩结果 + + + + + 原始图片 + {{ formatFileSize(originalSize) }} + + + + + 尺寸: {{ originalWidth }} × {{ originalHeight }} px + + + + + + 压缩后图片 + {{ formatFileSize(compressedSize) }} + + + + + 尺寸: {{ compressedWidth }} × {{ compressedHeight }} px + 压缩率: {{ compressionRatio }}% + + + + + + 下载压缩图片 + + + + + + + + + +