UNPKG

y-taro-ui

Version:

基于taro的表单解决方案 & 基础组件

34 lines (33 loc) 1.16 kB
import React from 'react'; import './index.less'; export declare type FileConfig = { type?: string; url?: string; id?: string; }; export declare type FileItem = { type: string; url: string; id: string; }; export interface ImagePickerProps { disabled?: boolean; className?: string; value?: string | string[]; borderType?: 'none' | 'dashed' | 'slide'; showDelete?: boolean; showAdd?: boolean; maxCount?: number; onUpload?: (string: any) => Promise<any>; onGetfile?: (string: any) => Promise<any>; mode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right'; onChange?: (value: string | string[], id?: string) => void; onPreview?: Function; addonAfter?: React.ReactNode; fileConfig?: FileConfig; dataFormat?: (data: {}) => FileItem; showErrorMessage?: boolean; valueType?: 'string' | 'array'; } export declare const ImagePicker: React.MemoExoticComponent<(props: ImagePickerProps) => JSX.Element>; export default ImagePicker;