declare class FileUploadRuleVo {
    /**
     * 扩展名
     */
    extraName: string;
    /**
     * 文件最大大小
     */
    maxSize: number;
    constructor(extraName: string, maxSize: number);
}
export default class FileUploadRule {
    private rules;
    private changeHandler;
    errorMessage: string;
    constructor();
    /**
     * 新增上传规则
     * @param extraName
     * @param maxSize
     */
    add: (extraName: string, maxSize: number) => void;
    /**
     * 清空规则
     */
    clear: () => void;
    /**
     * 规则发生变化事件
     * @param handler
     */
    setChangeHandler: (handler: Function) => void;
    /**
     * 获得所有规则
     * @returns
     */
    getRules: () => FileUploadRuleVo[];
    /**
     * 获得提示信息
     */
    getErrorMessage: () => string;
    /**
     * 获得上传提示,根据收集的规则来生成提示信息
     */
    getUploadTips: () => any[];
    /**
     * 获得接受的文件类型
     */
    getAccept: () => any;
    private bytesToSize;
    /**
     * 检查文件是否合法
     * @param file
     * @returns
     */
    check: (file: File) => boolean;
}
export {};
