@aliretail/react-materials-components
Version:
82 lines (81 loc) • 2.41 kB
TypeScript
import React from 'react';
interface BigExcelImportProps {
text?: boolean;
btnType?: 'primary' | 'secondary' | 'normal';
showHistory?: boolean;
className?: string;
hideIcon?: boolean;
hoverText?: string;
hoverAlign?: 'b' | 'br' | 'rt' | 'tr' | 't' | 'r' | 'l' | 'tl' | 'bl' | 'lt' | 'lb' | 'rb';
jobId?: string;
sceneId: string;
historyInputQuery?: {
field: string;
value: any;
}[];
maxRowNum?: number;
appCode: string;
service: string;
parameters?: any;
importHint?: any;
fileType?: string;
btnText?: string;
subTitle?: string;
isComplex?: boolean;
notifyService?: any;
onImportError?: (result: any) => void;
onImportSuccess?: (result: any) => void;
onOk?: () => void;
onCancel?: () => void;
}
interface BigExcelImportState {
showImportLayerVisible?: boolean;
hasBackgroundJob?: boolean;
uploadStatus?: string;
uploadErrorReason?: string;
status?: string;
footerActions?: string[];
fileError?: boolean;
file?: any;
inputFile?: any;
result?: any;
percent?: number;
}
declare class BigExcelImport extends React.Component<BigExcelImportProps, BigExcelImportState> {
constructor(props: any);
getAppCode: () => any;
openImportDialog: () => void;
handleImportProgress: ({ status, result, percent, inputFile }: {
status: any;
result: any;
percent: any;
inputFile: any;
}) => void;
handleCloseDialog: () => void;
handleBackgroundTask: () => void;
doImport: (file: any) => void;
doNotify: (status: any, result: any) => void;
handleImport: () => void;
onUploadSuccess: (file: any) => void;
/**
* 无法明确区分MINE类型和扩展名,仅针对xlsx判断
* @param file
* @param type
*/
checkType: (file: any, type: any) => boolean;
checkSize: (file: File) => boolean;
beforeUpload: (file: any) => boolean;
onUploadError: (file: any) => void;
onRemove: () => void;
isDownloadNeeded: () => any;
handleOk: () => void;
renderImportContent(): JSX.Element;
renderFooter: () => JSX.Element;
renderImportHint: () => JSX.Element;
renderUpload(): JSX.Element;
renderImportButton(): JSX.Element;
handleShowHistory: () => void;
renderBtn(): JSX.Element;
render(): JSX.Element;
}
export default BigExcelImport;