From 770574ede146660cf90dabd8dcbc44503242aa12 Mon Sep 17 00:00:00 2001 From: nuintun Date: Thu, 22 Sep 2022 10:19:13 +0800 Subject: [PATCH] feat(types): Update compressImage types --- packages/taro/types/api/media/image.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/taro/types/api/media/image.d.ts b/packages/taro/types/api/media/image.d.ts index 18f3525996b5..dcaea5751ed7 100644 --- a/packages/taro/types/api/media/image.d.ts +++ b/packages/taro/types/api/media/image.d.ts @@ -195,6 +195,10 @@ declare module '../../index' { fail?: (res: TaroGeneral.CallbackResult) => void /** 压缩质量,范围0~100,数值越小,质量越低,压缩率越高(仅对jpg有效)。 */ quality?: number + /** 压缩后图片的宽度,单位为px,若不填写则默认以 compressedHeight 为准等比缩放。 */ + compressedWidth?: number + /** 压缩后图片的高度,单位为px,若不填写则默认以 compressedWidth 为准等比缩放。 */ + compressHeight?: number /** 接口调用成功的回调函数 */ success?: (result: SuccessCallbackResult) => void }