UNPKG

fastlion-amis

Version:

一种MIS页面生成工具

105 lines (104 loc) 3.32 kB
import { UploadFile, UploadFileStatus } from 'antd/lib/upload/interface'; import React from 'react'; import { RendererProps } from '../../../../../factory'; import { FormControlProps, FormBaseControl } from '../../../../Form/Item'; import { UploadProps } from 'antd/lib/Upload'; import './LionFormImg.css'; import { Binary } from '@babel/types'; interface FileParams { upload_cmd: 'check_exist' | 'chunk_upload' | 'chunk_merge' | {} & string; upload_name: string; upload_field: string; file_md5?: string; chunk_index?: number; chunk_total?: number; chunk_size?: number; type?: string; chunk_file?: Binary; file_type: string; preUploading: boolean; chunksSize: number; currentChunks: number; uploadPercent: number; preUploadPercent: number; uploadRequest: boolean; uploaded: boolean; uploadParams: any; arrayBufferData: any; formItemName: string; fileSize: number; } interface IState { fileList: any; previewVisible: boolean; previewImage: string; previewTitle: string; showfileList: any; loading: boolean; errorImage: UploadFile; type: string; params: string; turtyfilelist: any[]; init: boolean; formItemName: string; imgHeight: string; } export interface LionInputImgSchema extends FormBaseControl { type: 'lion-input-img'; } export interface LionInputImgProps extends FormControlProps, Omit<LionInputImgSchema, 'type' | 'className' | 'descriptionClassName' | 'inputClassName'> { } export declare class LionInputImg extends React.PureComponent<LionInputImgProps & UploadProps & RendererProps, FileParams & IState> { unHook: Function; state: { imgHeight: string; previewVisible: boolean; previewImage: string; previewTitle: string; errorImage: { url: string; uid: string; status: UploadFileStatus; name: string; }; fileList: never[]; showfileList: any; turtyfilelist: any; loading: boolean; type: string; params: string; init: boolean; formItemName: string; preUploading: boolean; chunksSize: number; currentChunks: number; uploadPercent: number; preUploadPercent: number; uploadRequest: boolean; uploaded: boolean; uploadParams: any; arrayBufferData: any; upload_cmd: string; upload_name: string; upload_field: string; file_type: string; fileSize: number; }; initFileData(): void; componentDidUpdate(prevProps: any, prevState: any): void; componentDidMount(): void; handleCancel: () => void; handlePreview: (file: any) => Promise<void>; handleChange: (file: any) => void; handleFile: (config: any) => Promise<unknown>; handleUpload: (config: any) => void; handlePartUpload: (uploadList: any, file: any) => void; uuid: () => string; handleMergeFile: () => void; matchLocalhost: (str: any) => boolean; handleRemove: (file: any) => void; render(): JSX.Element; } export declare class LionInputImgRenderer extends LionInputImg { } export {};