From a9f594fb1c3d37363d93384b03ea54a6a4b3b75a Mon Sep 17 00:00:00 2001 From: IchliebedichZhu <54796446@qq.com> Date: Mon, 4 Mar 2024 21:32:09 +0000 Subject: [PATCH] feat: convert create-cover component to vue3 --- src/common/methods/QiNiu.ts | 2 +- .../business/save-download/CreateCover.vue | 97 +++++++++---------- src/types/global.d.ts | 2 +- 3 files changed, 49 insertions(+), 52 deletions(-) diff --git a/src/common/methods/QiNiu.ts b/src/common/methods/QiNiu.ts index 18de8fd..35d59d0 100644 --- a/src/common/methods/QiNiu.ts +++ b/src/common/methods/QiNiu.ts @@ -15,7 +15,7 @@ interface Options { } export default { - upload: async (file: File, options: Options, cb?: IQiniuSubscribeCb) => { + upload: async (file: File | Blob, options: Options, cb?: IQiniuSubscribeCb) => { const win = window let name = '' const suffix = file.type.split('/')[1] || 'png' // 文件后缀 diff --git a/src/components/business/save-download/CreateCover.vue b/src/components/business/save-download/CreateCover.vue index ecbbe91..a08dd7a 100644 --- a/src/components/business/save-download/CreateCover.vue +++ b/src/components/business/save-download/CreateCover.vue @@ -2,66 +2,63 @@ * @Author: ShawnPhang * @Date: 2021-08-01 11:12:17 * @Description: 前端出图 - 用于封面 - * @LastEditors: ShawnPhang - * @LastEditTime: 2023-09-13 17:36:36 + * @LastEditors: ShawnPhang , Jeremy Yu + * @Date: 2024-03-04 18:50:00 --> - diff --git a/src/types/global.d.ts b/src/types/global.d.ts index 08e1e47..a115792 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -40,7 +40,7 @@ interface IQiniuSubscribeCb { interface Window { qiniu: { upload: ( - file: File, + file: File | Blob, name: string, token: string, exObj: Record,