UNPKG

sard-uniapp

Version:

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

303 lines (302 loc) 9.89 kB
import { CropImageProps } from '../crop-image/common'; export interface CropImageAgentProps extends CropImageProps { id?: string; } export type CropImageOptions = Omit<CropImageAgentProps, 'src'> & Required<Pick<CropImageAgentProps, 'src'>>; export declare const defaultCropImageAgentProps: () => { id?: string | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string) | undefined; rootStyle?: string | false | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string | false | import("vue").CSSProperties | import("vue").StyleValue[]) | null | undefined; rootClass?: string | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string) | undefined; visible?: boolean | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => boolean) | undefined; src?: string | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string) | undefined; cropScale?: string | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string) | undefined; type?: "png" | "jpg" | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => "png" | "jpg") | undefined; quality?: number | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => number) | undefined; duration?: number | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => number) | undefined; success?: ((filePath: string) => void) | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => (filePath: string) => void) | undefined; fail?: ((err: any) => void) | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => (err: any) => void) | undefined; complete?: (() => void) | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => () => void) | undefined; cancel?: (() => void) | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => () => void) | undefined; beforeCrop?: ((width: number, height: number) => number) | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => (width: number, height: number) => number) | undefined; cancelText?: string | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string) | undefined; confirmText?: string | ((props: { id: string; rootStyle: import("vue").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; beforeCrop: (width: number, height: number) => number; cancelText: string; confirmText: string; }) => string) | undefined; }; export declare const imperativeName = "cropImage"; export interface CropImageImperative { show(newProps: Record<string, any>): void; hide(): void; } declare const cropImage: (options: CropImageOptions) => void; export { cropImage };