import LoadingAnimation from "@/components/loading-animation"; import { ExclamationCircleFilled } from "@ant-design/icons"; import cls from "classnames"; export const IframeLoading = ({ filename, type, text, errorElement, classNameTitle = "", showHeader, }: { filename?: string; type: "loading" | "error"; text?: string; errorElement?: React.ReactElement; classNameTitle?: string; showHeader?: boolean; }) => { return (
{showHeader && (
{filename}
)}
{type === "error" ? ( errorElement ? ( errorElement ) : ( <> 上传失败,请 重新上传 ) ) : ( <> {text || "PDF 上传中,请稍等..."} )}
); };