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 }}% + + + + + + 下载压缩图片 + + + + + + + + + +