Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(types): Update compressImage types #12549

Merged
merged 1 commit into from
Sep 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/taro/types/api/media/image.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down