zy-react-library/components/ImportFile/index.d.ts

34 lines
850 B
TypeScript
Raw Normal View History

2025-10-29 11:35:09 +08:00
import type { FormInstance, FormProps } from "antd/es/form";
import type { FC, ReactNode } from "react";
/**
*
*/
export type FormValues = Record<string, any>;
export interface ImportFileProps extends Omit<FormProps, "form"> {
/** 弹窗是否显示 */
visible: boolean;
/** 弹窗标题 */
title?: string;
/** 模板文件地址 */
2025-12-18 16:30:01 +08:00
templateUrl?: string;
2025-10-29 11:35:09 +08:00
/** 子组件 */
children?: ReactNode | ((props: { form: FormInstance }) => ReactNode);
/** 确认回调 */
onConfirm: (values: FormValues) => void;
/** 取消回调 */
onCancel: () => void;
2025-12-18 16:30:01 +08:00
/** 导出模板按钮文字,默认 “导出模板” */
exportTemplateButtonText?: ReactNode;
/** 额外按钮 */
extraButtons?: ReactNode;
2025-10-29 11:35:09 +08:00
}
/**
*
*/
declare const ImportFile: FC<ImportFileProps>;
export default ImportFile;