import React, { ReactNode } from "react"; import { Button, Modal, Result } from "antd"; import { AddOrUpdate, SaveJumpType } from "../../../tmpl/interface"; import { ResultStatusType } from "antd/lib/result"; import { useLocale } from "../../../locale/useLocale"; import DraggableModal from "../../../module/draggable-modal"; interface PostResultProps { title?: ReactNode; subtitle?: ReactNode; open: boolean; jumpTypes: SaveJumpType[]; addOrUpdate: AddOrUpdate; resultStatus?: ResultStatusType; goAdd: () => void; goEdit: () => void; goList: () => void; } const PostResult: React.FC = ({ resultStatus = "success", ...props }) => { const { title, open, subtitle, goAdd, goEdit, goList, jumpTypes, addOrUpdate, } = props; const { translate } = useLocale(); return ( goAdd()}> {addOrUpdate === "update" ? translate("${转添加}") : translate("${继续添加}")} ) : ( undefined ), goEdit && jumpTypes && jumpTypes.includes("edit") ? ( ) : ( "" ), goList && jumpTypes && jumpTypes.includes("list") ? ( ) : ( "" ), ]} > ); }; export default PostResult;