UNPKG

sard-uniapp

Version:

sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库

319 lines (318 loc) 10 kB
import { type StyleValue } from 'vue'; import { type TransitionHookEmits } from '../popup/common'; export interface CropImageProps { rootStyle?: StyleValue; rootClass?: string; visible?: boolean; src?: string; cropScale?: string; type?: 'png' | 'jpg'; quality?: number; duration?: number; success?: (filePath: string) => void; fail?: (err: any) => void; complete?: () => void; cancel?: () => void; id?: string; beforeCrop?: (width: number, height: number) => number; cancelText?: string; confirmText?: string; } export declare const defaultCropImageProps: { rootStyle?: (string | false | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string | false | import("vue").CSSProperties | StyleValue[]) | null) | undefined; rootClass?: (string | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string)) | undefined; visible?: (boolean | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => boolean)) | undefined; src?: (string | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string)) | undefined; cropScale?: (string | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string)) | undefined; type?: ("png" | "jpg" | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => "png" | "jpg")) | undefined; quality?: (number | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => number)) | undefined; duration?: (number | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => number)) | undefined; success?: (((filePath: string) => void) | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => (filePath: string) => void)) | undefined; fail?: (((err: any) => void) | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => (err: any) => void)) | undefined; complete?: ((() => void) | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => () => void)) | undefined; cancel?: ((() => void) | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => () => void)) | undefined; id?: (string | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string)) | undefined; beforeCrop?: (((width: number, height: number) => number) | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => (width: number, height: number) => number)) | undefined; cancelText?: (string | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string)) | undefined; confirmText?: (string | ((props: { rootStyle: StyleValue; rootClass: string; visible: boolean; src: string; cropScale: string; type: "png" | "jpg"; quality: number; duration: number; success: (filePath: string) => void; fail: (err: any) => void; complete: () => void; cancel: () => void; id: string; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string)) | undefined; }; export interface CropImageSlots { default?(props: Record<string, never>): any; } export interface CropImageEmits extends TransitionHookEmits { (e: 'update:visible', visible: boolean): void; } export interface CropImageExpose { }