From 53df4edd76a0538d14b2d6a3500aef74ae8f80a0 Mon Sep 17 00:00:00 2001 From: ShawnPhang Date: Thu, 5 Oct 2023 16:25:56 +0800 Subject: [PATCH] feat: image support fast matting --- src/common/methods/QiNiu.ts | 6 ++-- .../business/image-cutout/ImageCutout.vue | 31 +++++++++++++++---- src/components/common/Uploader/index.vue | 6 ++-- .../panel/wrap/components/photoList.vue | 3 +- .../modules/widgets/wImage/wImageStyle.vue | 29 ++++++++++++++--- 5 files changed, 57 insertions(+), 18 deletions(-) diff --git a/src/common/methods/QiNiu.ts b/src/common/methods/QiNiu.ts index a16db01..31dd1e7 100644 --- a/src/common/methods/QiNiu.ts +++ b/src/common/methods/QiNiu.ts @@ -2,8 +2,8 @@ * @Author: ShawnPhang * @Date: 2021-08-29 20:35:31 * @Description: 七牛上传方法 - * @LastEditors: ShawnPhang - * @LastEditTime: 2023-07-11 22:02:12 + * @LastEditors: ShawnPhang + * @LastEditTime: 2023-10-05 16:11:55 */ import dayjs from 'dayjs' import api from '@/api/album' @@ -18,7 +18,7 @@ export default { upload: async (file: File, options: Options, cb?: Function) => { const win: any = window let name = '' - const suffix = file.type.split('/')[1] // 文件后缀 + const suffix = file.type.split('/')[1] || 'png' // 文件后缀 if (!options.fullPath) { // const DT: any = await exifGetTime(file) // 照片时间 const DT: any = new Date() diff --git a/src/components/business/image-cutout/ImageCutout.vue b/src/components/business/image-cutout/ImageCutout.vue index 645b6d7..8f1e07c 100644 --- a/src/components/business/image-cutout/ImageCutout.vue +++ b/src/components/business/image-cutout/ImageCutout.vue @@ -3,7 +3,7 @@ * @Date: 2023-07-11 23:50:22 * @Description: 抠图组件 * @LastEditors: ShawnPhang - * @LastEditTime: 2023-09-30 12:23:39 + * @LastEditTime: 2023-10-05 16:19:11 -->